Skip to content

Prevent merge if the merge request pipeline is stale

Shinya Maeda requested to merge ignore-merge-when-merge-pipelines-is-stale into master

What does this MR do?

When a project is enabling "Merge request pipelines" option, merge request pipelines will be generated in order for validating post-merge pipeline result. This is intended for preventing master branch from having red pipelines, however, currently users can merge MRs even though the target branch is advanced.

Screenshot_from_2019-04-03_14-29-09

In this case, frontend shows the following warning, however, backend doesn't prevent merging at the moment.

Screenshot_from_2019-04-03_14-36-47

We should not let users to continue merge process if it's the case.

What are the relevant issue numbers?

Close: https://gitlab.com/gitlab-org/gitlab-ee/issues/7380

This MR has CE backport

Does this MR meet the acceptance criteria?

Edited by Kamil Trzciński

Merge request reports