BigW Consortium Gitlab

Commit b7eb0d17 by Marin Jankovski

Add checkbox for protected branch developer can push to.

parent 6ce3b1a3
...@@ -27,6 +27,6 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController ...@@ -27,6 +27,6 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
private private
def protected_branch_params def protected_branch_params
params.require(:protected_branch).permit(:name) params.require(:protected_branch).permit(:name, :developers_can_push)
end end
end end
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
= f.label :name, "Branch", class: 'control-label' = f.label :name, "Branch", class: 'control-label'
.col-sm-10 .col-sm-10
= f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "select2"}) = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "select2"})
.form-group
= f.label :developers_can_push, "Developers can push?", class: 'control-label'
.col-sm-10
= f.check_box :developers_can_push
.form-actions .form-actions
= f.submit 'Protect', class: "btn-create btn" = f.submit 'Protect', class: "btn-create btn"
- unless @branches.empty? - unless @branches.empty?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment