Only allow merge requests to be merged if the pipeline succeeds
I'll be short. The race condition for usecase is next:
- enable pipelines and check 'Only allow merge requests to be merged if the pipeline succeeds'
- configure .gitlab-ci.yml with 1 job that contains only: - master
- create branch 'break', add broken code and create merge request
- click merge request button without pipeline build
Expected: disabled button for merge and failed pipeline build
Actual: successful merge and after merge failed pipeline build
My problem is that I thought master branch was protected by pipelines as job was configured on master only and option 'Only allow merge requests to be merged if the pipeline succeeds' was checked.
Is there any option to achieve it?
regards
p.s. another funny usecase - if after failed pipeline build in merge request I send same broken code but with only: - master merge tool shows 'Could not connect to the CI server. Please check your settings and try again'
Edited by Yurii K.