Skip to content

pkg-merge-upstream-to-downstreams: Do not abort automerging

When pushing new commits to a MR set to be merged automatically with the merge_request.merge_when_pipeline_succeeds push option GitLab aborts the automated merge.

This meant that our automerging never worked because we first pushed the unmerged commit to create the MR and when the local merge attempt succeeded we pushed the result to the same MR, causing GitLab to abort the automerging.

To make it work, ensure we only push once to create the MR, either with the result of the local merge or the unmerged commit if the local attempt failed.

Merge request reports

Loading