Fix fallback logic for automatic MR title assignment
What does this MR do?
When a merge request containing just one commit was opened, GitLab automatically suggests . For some reason (it might have to do with our barely used GitLab-internal issue tracker and the configured custom external issue tracker - apparently an unfortunate combination), GitLab seemed to think that the branch name (in this case fl/stat-notification-default
) contained an issue reference and thus tried to retrieve the referenced issue to then pre-fill the MR title with Resolves "Issue title"
.
Judging by the comment a few lines above, GitLab should not even try to do so:
Setting the title as 'Resolves "Emoji don't show up in commit title"' if there is more than one commit in the MR
This MR makes sure the "Resolves ..." code is only run when no other suggestion for the title has been made.
Are there points in the code the reviewer needs to double check?
Is the comment still describing the intended behavior?
Why was this MR needed?
I missed the very useful behavior of extracting the title and message from branches containing just a single commit which worked flawlessly in other projects.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Conforms to the code review guidelines
-
Has been reviewed by a Backend maintainer
-
-
Conforms to the merge request performance guidelines -
Conforms to the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Possibly related to #27935 (moved).