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
end
def variables_for(ref)
vars = if ProtectedBranch.protected?(self, ref) ||
ProtectedTag.protected?(self, ref)
variables.to_a
else
variables.to_a.reject(&:protected?)
end
vars =
if ProtectedBranch.protected?(self, ref) ||
ProtectedTag.protected?(self, ref)
variables.to_a
else
variables.to_a.reject(&:protected?)
end
vars.map(&:to_runner_variable)
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