Allow protected branches to be created by Developers if no new commits are added via API and interface
Branched can be protected to prevent changes being pushed or merged except by certain people. It is common to configure master
and release-*
branches so that No one can push directly to the branch so that every change must occur through a merge request. However, this creates the situation where no one can create new release branches!
GitLab should make it possible to create new protected branches without having to give push permissions to someone or temporarily disable then enable the protected branch rules.
Further details
This problem exists when a pattern like release-*
is used and release branches are created regularly.
One approach would be to add a Create branch setting for protected branches, but this makes no sense for non-pattern protected branch rules and adds yet another configuration.
Proposal
Allow Developers to be able to create new protected branches if the HEAD
of the new protected branch is already in a protected branch. Subsequent pushes would be rejected because the branch already exists.