Improve merge train drop reason messages

What does this MR do and why?

Improve merge train drop reason messages

The system note posted when a merge request is dropped from a merge train reads " removed this merge request from the merge train because ", but several reason strings did not read as a continuation of that sentence, and one path leaked a raw Gitaly error straight into the note.

Move format_reason from SystemNotes::MergeRequestsService to SystemNotes::BaseService and apply it in SystemNotes::MergeTrainService, so a capitalized reason no longer produces "because Merge request is not mergeable...". Reword the reason fragments that did not read as sentences, in the merge train services and in the shared auto-merge services. Frame errors from building the train ref and its pipeline instead of passing them through raw, and drop the gRPC status code prefix so "9:Failed to create merge commit ..." no longer reaches the Activity feed. AutoMerge::AvailabilityCheck now renders a failing mergeability check's human explanation instead of its internal identifier. Expand the merge trains troubleshooting docs with the common drop causes and what each reason means.

This makes the note readable, but it cannot name the conflicting files. UserMergeToRef discards the underlying merge error before GitLab sees it, so the root cause needs a Gitaly change first: gitaly#7330 (closed)

Localizing these notes with gettext was tried and reverted in master (3fa6a16c, then 159731ed): note bodies are persisted raw with no display-time translation, so wrapping only freezes the creator's locale. Left in English for now.

Related to #394901

Changelog: changed

References

Screenshots or screen recordings

Before After

How to set up and validate locally

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.

Related to #394901

Merge request reports

Loading
Loading