Project branch name push rules should apply to new branches only
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=351001) </details> <!--IssueSummary end--> <!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "type::bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=type::bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary Lets say you have old branch named `Development` and you enabled the push rule later on under the `project > repository > push rules > branch name` to prevent branches with capitalised letters, regex `^[a-z0-9\\-]{4,15}$`, you are not able to merge anything in to the branch `Development` because the branch name is capitalised. Should the push rules not apply only to the branches that are created after you enable the push rule? ### Steps to reproduce * Create a branch with capitalised name let's say `Dev` * Enable push rule under the `project > repository > push rules > branch name` with regex `^[a-z0-9\\-]{4,15}$` * You are no longer able to merge in to the branch `Dev`
issue