Replace the dropdown selection for default branch protection with a form that matches protected branches
This issue and linked pages contain information related to upcoming products, features, and functionality. It is important to note that the information presented is for informational purposes only. Please do not rely on this information for purchasing or planning purposes. As with all projects, the items mentioned in this video and linked pages are subject to change or delay. The development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.
Problem to solve
See full context in the parent epic
The 4 options that are currently available for default branch protections do not cover all the variations of the protected branch.
form-select with a
form-group that matches protected branch options.
|Not protected||Protected (Default)|
|Allow owners to make changes||Only administrators can make a change|
Admins always have control
Disable the group
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.
frontend weight estimated at
app/views/shared/_default_branch_protection.html.hamlto show the new options.
- Update specs.
It looks like there has recently been new work done to allow these type of protected branch settings at the group level(!107792 (merged))
I am currently thinking that this change will be broken in 2 phases
- refactor the existing code to use the
ProtectedBranchmodel rather than the hardcoded settings in
- Once the existing code is using
ProtectedBranch, support the new options via that model
I am still trying to wrap my head around how application settings generally, and protected branches specifically, are implemented. It is possible that only phase 1 is needed, and we'd get phase 2 automatically, making the overall effort a
- Update the documentation for default branch protection.