Make users aware that Branch name from Push Rules sections to Branch name template from Branch Defaults section must not contradict each other.
Problem to solve
For GitLab Premium customer, when Branch name template
and Branch name
rules are in contradition...
Branch name template | Branch name |
---|---|
... it is very difficult to understand why one can't create an MR (and with that a branch)
Proposal
While we should certainly improve the error message, we should also make it less likely that these two rules could be in contradiction in first place. When users edit one of the two rules, it should be brought to their attention that there setting should respect the respective other rule.
For GitLab Premium & Ultimate
For GitLab Premium and GitLab Ultimate users we should change the taglines under the text fields in the following way:
Under the Branch name
input field:
All branch names must match this regular expression. If empty, any branch name is allowed. Check
[Branch defaults > Branch name templates](link)
for potential conflicts.
Under the Branch name template
input field:
Leave empty to use default template. Maximum 255 characters. What variables can I use? Make sure this pattern does not contradict the
[Push rules > Branch name](link)
setting.
For GitLab Free
For GitLab Free users leave the line under the input field for branch name templates
unchanged (i.e. keep Leave empty to use default template. Maximum 255 characters. \[What variables can I use?\](<link>)
). (The branch name
push rule does not exist for these users.)
Availability and Testing
Please run the full e2e:package-and-test
job for regression purposes.