Skip to content

Support running different sets of mergeability checks

Patrick Bajao requested to merge 423110-support-running-different-checks into master

What does this MR do and why?

We need to add more mergeability checks to the mergeability framework. But they are called in a different order in MergeRequest#mergeable?.

To be able to do that, we define 2 different sets of mergeability checks: mergeable_state_checks and mergeable_git_state_checks.

The mergeable_state_checks contains the existing checks while the new mergeable_git_state_checks contains 2 new checks:

  • CheckConflictStatusService
  • CheckRebaseStatusService

They replace old check in #mergeable? that checks:

can_be_merged? && (!should_be_rebased? || skip_rebase_check)

This is all needed in preparation to expose all merge check statuses in GraphQL API: !132349 (merged).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #423110 (closed)

Edited by Patrick Bajao

Merge request reports

Loading