Skip to content

Add a regex pattern to automatically create protected branches

Originally opened at !3936 (closed) by @jakubgarfield.


What does this MR do?

When a new branch is created and pushed it tries to match it against the auto-protected branch pattern and if matched it creates a protected branch. An additional checkbox allows to specify if developers can push to such branches.

The feature is disabled if the protected branch pattern is empty.

Are there points in the code the reviewer needs to double check?

I thought that since the feature adds the auto-creation of branches, the new attributes should include an auto_ prefix, but as always, naming is hard so any feedback is welcome! Also, I'm not sure about copy in the project's edit page and in the docs.

What are the relevant issue numbers?

Closes #5977 (closed).

Screenshots

Screen_Shot_2016-06-07_at_09.53.28

Merge request reports