CODEOWNERS push rule
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
I want to let some developers push straight to masters, but I also want to limit the files they can change.
I have just discovered that the push rule technically works, but it rejects an actual git push
and requires MR instead. However, commits through web editor / IDE seem to work. Is this intended?
Intended users
Further details
In my case I have a repository with websites and CI which builds, tests and deploys the websites. I want to let less programming-oriented people edit the HTML (small fixe from time to time). Gitlab interface is very friendly in this regard, users just go edit files, click "Commit" and in 5 minutes everything is magically updated. CI makes sure that if a change is breaking, nothing gets deployed, and git itself lets me roll back any changes. However, to prevent unintended consequences, I want to only let them edit HTML.
Proposal
Push rules seems to be the best way to do it (I'd like to avoid MRs). CODEOWNERS lets me define who can touch what files. The only piece that is missing is having a rule that only a code owner can push a change to a file.
What does success look like, and how can we measure that?
Evident from above sections. Non-codeowners commit needs to be rejected upon push (preferably in Web interface).
What is the type of buyer?
I guess since CODEOWNERS is enterprise, this feature will be there as well.