Commit 8f44bc4d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Rubocop makes more sense with this

parent 2785bc4f
...@@ -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
......
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