Skip to content

Add pipeline must succeed warning to MR widget

What does this MR do?

There is currently no feedback indicating why the merge button is disabled on a merge request when these two conflicting settings are enabled for a project:

  • Settings -> General -> Merge Requests -> Merge checks -> "Pipelines must succeed" is checked
  • Settings -> General -> Visibility, project features, permissions -> "Pipelines" is disabled

This MR adds a message to display in the ready-to-merge widget of the merge request when this happens that explains why the merge request is not mergeable and directs the user to the documentation. The message is displayed similarly to the "You can only merge once the items above are resolved" message, but with specific text indicating what is wrong and where to go to learn more:

Only merge requests with pipelines that succeed are allowed to be merged. For more information, see the documentation.

Screenshot
Screen_Shot_2019-08-09_at_10.28.18

EE port: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14732

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Related:

Edited by Miranda Fluharty

Merge request reports