debian-mirror-gitlab/app/graphql/resolvers/ci/inherited_variables_resolver.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
299 B
Ruby
Raw Normal View History

2023-07-09 08:55:56 +05:30
# frozen_string_literal: true
module Resolvers
module Ci
class InheritedVariablesResolver < BaseResolver
type Types::Ci::ProjectVariableType.connection_type, null: true
def resolve
object.group&.self_and_ancestors&.flat_map(&:variables) || []
end
end
end
end