Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lib/api/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