Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
be2f13883c90
Commit
be2f1388
authored
Dec 29, 2014
by
Marin Jankovski
Browse files
Use shorter search for protected branch status.
parent
9aa3a45d1453
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
be2f1388
...
...
@@ -471,7 +471,7 @@
end
def
developers_can_push_to_protected_branch?
(
branch_name
)
protected_branches
.
map
{
|
pb
|
pb
.
developers_can_push
if
pb
.
name
==
branch_name
}.
compact
.
first
protected_branches
.
any?
{
|
pb
|
pb
.
name
==
branch_name
&&
pb
.
developers_can_push
}
end
def
forked?
...
...
Write
Preview
Supports
Markdown
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