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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8f44bc4d
Commit
8f44bc4d
authored
May 27, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rubocop makes more sense with this
parent
2785bc4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
app/models/project.rb
app/models/project.rb
+7
-6
No files found.
app/models/project.rb
View file @
8f44bc4d
...
@@ -1257,12 +1257,13 @@ class Project < ActiveRecord::Base
...
@@ -1257,12 +1257,13 @@ class Project < ActiveRecord::Base
end
end
def
variables_for
(
ref
)
def
variables_for
(
ref
)
vars
=
if
ProtectedBranch
.
protected?
(
self
,
ref
)
||
vars
=
ProtectedTag
.
protected?
(
self
,
ref
)
if
ProtectedBranch
.
protected?
(
self
,
ref
)
||
variables
.
to_a
ProtectedTag
.
protected?
(
self
,
ref
)
else
variables
.
to_a
variables
.
to_a
.
reject
(
&
:protected?
)
else
end
variables
.
to_a
.
reject
(
&
:protected?
)
end
vars
.
map
(
&
:to_runner_variable
)
vars
.
map
(
&
:to_runner_variable
)
end
end
...
...
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