Push Rules: Ticket reference push rule can be satisfied if branch name satisfies ticket regex
Description
Currently using regex you can set a push rule that will ensure that every commit message references a ticket, i.e. your commit message must contain JIRA-XXX. I don't see anywhere in the docs where it says that if, for example, i'm working on ticket JIRA-123 and I don't have JIRA-123 in my commit message, but the branch that i'm committing to is called feature/JIRA-123 then the commit would or would not still pass the push rule.
Proposal
I propose that this be extended so that if the commit doesn't reference a ticket, but the branch name satisfies the regex pattern, then the commits still pass the push rule.
Edited by 🤖 GitLab Bot 🤖