diff options
Diffstat (limited to 'lib/gitlab/ci/variables/collection/item.rb')
-rw-r--r-- | lib/gitlab/ci/variables/collection/item.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/ci/variables/collection/item.rb b/lib/gitlab/ci/variables/collection/item.rb index d6540e86fc5..1ed07cedd55 100644 --- a/lib/gitlab/ci/variables/collection/item.rb +++ b/lib/gitlab/ci/variables/collection/item.rb @@ -14,6 +14,10 @@ module Gitlab } end + def [](key) + @variable.fetch(key) + end + def ==(other) to_hash == self.class.fabricate(other).to_hash end @@ -39,6 +43,8 @@ module Gitlab self.new(resource.to_hash) when ::Ci::PipelineVariable self.new(resource.to_hash) + when ::Ci::GroupVariable + self.new(resource.to_hash) when self resource.dup else |