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 |
---|---|
![]() |
![]() |
How to set up and validate locally
- Enable the feature flag:
rails c
=>Feature.enable( :merge_request_title_regex )
- In the project settings, go to
Merge requests > Title regex
- Make the regex something your MRs will not pass, like
foofoo
(unless your MR title is already "foofoo"!) - Save the settings change
- Go to an open MR
- 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.