Commit 99dddac5 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Simplify ci config entry validator implementation

parent 946e8d3a
......@@ -24,16 +24,11 @@ module Gitlab
private
def location
predecessors = ancestors.map(&:key).compact
predecessors.append(key_name).join(':')
ancestors.map(&:key).compact.append(key_name).join(':')
end
def key_name
if key.blank?
@entry.class.name.to_s.demodulize.underscore.humanize
else
key
end
key.presence || @entry.class.name.to_s.demodulize.underscore.humanize
end
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