fix: throw error when trying to backport single undefined commit #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for submitting this pull request
fixes #176
Description
Since, by default,
squashis set totrue(when omitted).. if the process tries to backport a single squashed/merged commit from a merged PR/MR and the commit is undefined (e.g., in the case of fast-forward merge in Gitlab), the process should immediately abort with an error.The solution in that case is to either set
--auto-no-squashor explicitly disable squash with--no-squashwhich will make the process trying to merge all the original commits.How Has This Been Tested?
Added new test case for the new behavior
Checklist
Merge criteria:
First time here?
This project follows git conventional commits pattern, therefore the commits should have the following format:
Where the type must be one of
[build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]How to prepare for a new release?
There is no need to manually update
package.jsonversion andCHANGELOG.mdinformation. This process has been automated in Prepare Release Github workflow.Therefore whenever enough changes are merged into the
mainbranch, one of the maintainers will trigger this workflow that will automatically updateversionandchangelogbased on the commits on the git tree.More details can be found in package release section of the README.