Gitlab merge "merge request" with commit


Daniel Barton

I believe it's stupid question but I don't understand how should I use gitlab merge request push options

I have this scenario:

  • I have open merge request from develop to master
  • I make some changes on develop branch and push them to gitlab server with the proper option

git add .
git commit -m 'finish mr'
git push origin develop -o merge_request.merge_when_pipeline_succeeds

  • I expect that after pipelines of this commit will succeed the MR be merged but instead I get this message on gitlab MR page:

@user aborted the automatic merge because source branch was updated just now
@user added 1 commit just now

8efdbde1 - finish mr

So it seems that the push will set MR to allow merge after succeed and immediately abort it because of commit from same push. I also tried quick actions with /merge but same result. I know there is gitlab API, but I can't use it. Does anyone know what I am doing wrong?

Continue reading...