Tidy up auto merge quick action copy

What does this MR do and why?

This MR tidies up the auto-merge quick action copy to provide more consistent and user-friendly messaging across different merge strategies.

Previously, the /merge quick action displayed generic messages like "Merge automatically (Merge when checks pass)" which exposed implementation details. This change introduces strategy-specific copy that better communicates what will happen to the user.

Copy changes

The new auto_merge_strategy_copy method provides tailored messaging for each auto-merge strategy:

Strategy Description Explanation Feedback
add_to_merge_train Add to merge train Adds this merge request to merge train. Added to merge train.
add_to_merge_train_when_checks_pass Add to merge train when ready Adds this merge request to merge train when ready. Set to add to merge train when ready.
merge_when_checks_pass Set to auto-merge Sets this merge request to auto-merge when ready. Set to auto-merge.

This approach:

  • Removes implementation details like "checks pass" from user-facing copy
  • Provides consistent messaging across description, explanation, and feedback states
  • Uses "when ready" instead of "when checks pass" for better clarity

References

Related discussion: !215014 (comment 2944342172)

Screenshots or screen recordings

Description (shown in quick action menu):

Screenshot_2025-12-03_at_13.13.27

Feedback (shown after executing the command):

Screenshot_2025-12-03_at_13.13.34

How to set up and validate locally

  1. Create a merge request in a project with auto-merge enabled
  2. Use the /merge quick action in a comment
  3. Verify the appropriate copy is displayed based on the project's auto-merge strategy
  4. Check that the explanation and feedback messages match the expected copy from the table above

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 Marc Shaw

Merge request reports

Loading