Skip to content

Add pipeline must succeed warnings 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.

This MR also shows the pipeline section in the merge request widget whenever the "Pipelines must succeed" option is checked and will show the failure or absence of the pipeline so that the reason for disabling the merge button is more clear.

Screenshots

Before After
MR has pipeline information Screen_Shot_2019-09-30_at_09.45.03 Screen_Shot_2019-09-30_at_09.29.03
MR has no pipeline information Screen_Shot_2019-09-30_at_09.45.46 Screen_Shot_2019-09-30_at_09.29.28

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Related:

Edited by 🤖 GitLab Bot 🤖

Merge request reports