GitLab: rebaseWhen=auto should not update the branch when merge trains are enabled #36774
cjpearson
started this conversation in
Suggest an Idea
Replies: 1 comment 1 reply
-
|
rebaseWhen=auto converts to rebaseWhen=behind-base-branch whenever automerge=true. This is an opinionated decision in Renovate to only automerge branches which are up-to-date. There are some other reasons not related to automerge too, such as branch protection policies. I support this idea but it might require a slight change in the calls from Renovate's worker layer to platform layer to indicate not to rebase |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When merge trains are enabled on GitLab, the branch does not need to be up to date in order to merge. However, renovate will still rebase old branches when rebaseWhen=auto. This can cause MRs which are on the merge train to be removed.
There was a previous discussion on the topic here, but was closed when the author found a workaround.
#29842
The workaround is simple (set rebaseWhen=conflicted) but it's a bit inconsistent with the docs which state that rebasing will only occur if necessary due to a conflict or up-to-date requirement.
My assumption is that the logic here could be updated to something like
const forceRebase = config?.mergeMethod !== 'merge' && !config.mergeTrainsEnabled. (mergeTrainsEnabledis not on the config, but it is returned from the API) Does this make sense?Beta Was this translation helpful? Give feedback.
All reactions