[go: up one dir, main page]

Skip to content

Update merge check widget to link to MR edit page to fix title

What does this MR do and why?

For #538092 (closed)

There is a feature flag (merge_request_title_regex) that enforces a specific format (via settings) that the MR title must match.

This update adds a button to the merge check widget that gives the user a resolution path for this failure.

Note that there was no previous implementation for this error, BUT if a merge failure is returned and doesn't have a specific handler, we show it as a plain text widget by default. This means there is a previous "implementation" in the Before picture, because we know about the error type programmatically, but no work had been done to handle it.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Enable the feature flag: rails c => Feature.enable( :merge_request_title_regex )
  2. In the project settings, go to Merge requests > Title regex
  3. Make the regex something your MRs will not pass, like foofoo (unless your MR title is already "foofoo"!)
  4. Save the settings change
  5. Go to an open MR
  6. The merge checks should now include a failure for the title not matching the correct format.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thomas Randolph

Merge request reports

Loading