Loading
Draft: Let the title pattern choose the auto-remediation title format
What does this MR do and why?
Closes #634938.
A project can set a merge request title pattern, and an MR whose title fails it cannot merge. Auto-remediation chose plain or conventional titles from recent history only, so a project that just adopted a conventional pattern, with mostly plain history, got Security: Update ... MRs nobody could merge without renaming them. Raised in review of the Conventional Commits change.
- History still picks the style. When the project's pattern rejects the resulting title, the other format is used if it passes.
- The pattern only validates, so the conventional fallback uses
build(deps): [security] update .... - When neither format passes, the history choice stays and the mismatch is logged.
- The commit subject follows the same choice, since in a conventional repository the subject is the title.
- Behind the same
dependency_management_conventional_commitsflag as the conventional format. With the flag off, the pattern is not consulted and titles stay plain. - Matching uses
Gitlab::UntrustedRegexp.with_fallback, as the merge check does, and only when themerge_request_title_regex_checklicensed feature is available.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in performance, reliability, security, and maintainability.
Edited by Albina Yusupova