Skip to content

Allow configuring protection of default branch upon first push

What does this MR do?

Allows the GitLab admin to configure protection of default branches. Either not protected at all (pre-7.4 behaviour), fully protected (current behaviour and default) or protected with 'developers can push' option enabled (new!)

Why was this MR needed?

The new behaviour of protecting branches by default, introduced in 7.4.0, is unwanted in many situations where repositories are created by masters/owners and development is done by people with 'developer' rights; it causes them to be unable to continue after the first push until an admin manually intervenes.

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

I do not believe so.

What are the relevant issue numbers / Feature requests?

http://feedback.gitlab.com/forums/176466-general/suggestions/6661354-make-default-branch-protection-an-option

Screenshots

This MR adds UI for changing this setting.

After: Screen Shot 2015-01-25 at 15.11.24 Before: Screen Shot 2015-01-25 at 15.10.54

Merge request reports