Skip to content

Move the mergeable_ci check into the mergeable_ci method

What does this MR do and why?

When considering whether an MR has a mergeable_ci_state or not, we need to consider the auto merge strategy. In the case of merge when checks pass, we need to ignore the project setting of requiring a pipeline to pass, as this auto merge strategy requires a pipeline to succeed regardless of the project setting.

To test:

  • Turn on ff flags `Feature.enable(:merge_when_checks_pass)` and `Feature.enable(:additional_merge_when_checks_ready)`
  • Create a MR in a project with ci configured
  • Set MWCP
  • Run a pipeline
  • Cancel the pipeline
  • Check it says 'Pipeline must succeed'
  • Run the pipeline
  • Ensure the MR merges after passing

Related to #453993 (closed)

Edited by Marc Shaw

Merge request reports