Commit 985f5c4c authored by Jaime Martinez's avatar Jaime Martinez

Validate commit and branches

parent 8437890a
......@@ -44,12 +44,12 @@ module Gitlab
end
validate do
next unless config[:ref]
next if Commit.reference_valid?(config[:ref])
next if Gitlab::GitRefValidator.validate(config[:ref])
unless Gitlab::GitRefValidator.validate(config[:ref])
errors.add(:ref, "must be a valid ref")
end
end
end
def value
@config[:assets] = assets_value if @config.key?(:assets)
......
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