BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3e281f95
Commit
3e281f95
authored
Jul 19, 2016
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only update once
parent
e552b4af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
branches.rb
lib/api/branches.rb
+3
-2
No files found.
lib/api/branches.rb
View file @
3e281f95
...
@@ -51,8 +51,9 @@ module API
...
@@ -51,8 +51,9 @@ module API
developers_can_merge
=
to_boolean
(
params
[
:developers_can_merge
])
developers_can_merge
=
to_boolean
(
params
[
:developers_can_merge
])
if
protected_branch
if
protected_branch
protected_branch
.
update
(
developers_can_push:
developers_can_push
)
unless
developers_can_push
.
nil?
protected_branch
.
developers_can_push
=
developers_can_push
unless
developers_can_push
.
nil?
protected_branch
.
update
(
developers_can_merge:
developers_can_merge
)
unless
developers_can_merge
.
nil?
protected_branch
.
developers_can_merge
=
developers_can_merge
unless
developers_can_merge
.
nil?
protected_branch
.
save
else
else
user_project
.
protected_branches
.
create
(
name:
@branch
.
name
,
user_project
.
protected_branches
.
create
(
name:
@branch
.
name
,
developers_can_push:
developers_can_push
||
false
,
developers_can_push:
developers_can_push
||
false
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment