-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merging into the same branch should not abort the workflow when disabled #47
Comments
What's the branch you're releasing from? |
The error occured after pushing a commit (adding the backmerge config to .releaserc.json) to the We follow the gitlab flow branching scheme:
|
I think the behaviour is correct, with Going by your expected behaviour, you want it to merge into "backmergeBranches": [
- "main",
+ {"from": "pre-production", "to": "main"},
+ {"from": "production", "to": "main"},
{"from": "production", "to": "pre-production"}
], |
That is the workaround that I currently use now. Nevertheless, I disagree on your argumentation. Here is why 😄 In the documentation it's stated that the default settings are
If I alter the configuration to
Merging back into the same branch should just be ignored completly without any error / pipelines failing. |
The documentation states that
I agree, there is no need to make the pipeline fail. |
The proposed branching configuration works (for [4:28:19 PM] [semantic-release] [@saithodev/semantic-release-backmerge] › ✘ Process aborted due to an error while backmerging a branch.
[4:28:19 PM] [semantic-release] [@saithodev/semantic-release-backmerge] › ✘ Error: Command failed with exit code 1: git push [https://gitlab-ci-token:[secure]@REPO_URL.git](https://gitlab-ci-token:%5Bsecure%5D@REPO_URL.git) HEAD:main
To https://REPO_URL.git
! [rejected] HEAD -> main (non-fast-forward)
error: failed to push some refs to 'https://REPO_URL.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
at makeError (/builds/REPO/node_modules/execa/lib/error.js:60:11)
at handlePromise (/build/REPO/node_modules/execa/index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///builds/REPO/node_modules/@saithodev/semantic-release-backmerge/dist/helpers/git.js:16:32
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1 |
Is there an existing issue for this?
Current Behavior
I get an error when releasing on the default branch (main), eventhough the documentation suggests that the
allowSameBranchMerge
option isfalse
by default.Expected Behavior
should always merge back to
main
except the release happens onmain
.Edit: Or at least that should not lead to an java error, making the pipeline job fail ;-)
Steps To Reproduce
The configuration is
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: