diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-10 19:46:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-10 19:46:51 +0300 |
commit | 04ac4180cb5ba0df460034c7e64862056fd498b3 (patch) | |
tree | ca5267d12fa2aab80c1c35593b96c8cfceaa747b /app/graphql/types | |
parent | 4e9ceea7f8ff3e097ad45f6f54c1b7165248e848 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/types')
-rw-r--r-- | app/graphql/types/ci/inherited_ci_variable_type.rb | 48 | ||||
-rw-r--r-- | app/graphql/types/project_type.rb | 6 |
2 files changed, 54 insertions, 0 deletions
diff --git a/app/graphql/types/ci/inherited_ci_variable_type.rb b/app/graphql/types/ci/inherited_ci_variable_type.rb new file mode 100644 index 00000000000..2d8dcdaeefe --- /dev/null +++ b/app/graphql/types/ci/inherited_ci_variable_type.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +module Types + module Ci + # rubocop: disable Graphql/AuthorizeTypes + class InheritedCiVariableType < BaseObject + graphql_name 'InheritedCiVariable' + description 'CI/CD variables a project inherites from its parent group and ancestors.' + + field :id, GraphQL::Types::ID, + null: false, + description: 'ID of the variable.' + + field :key, GraphQL::Types::String, + null: true, + description: 'Name of the variable.' + + field :raw, GraphQL::Types::Boolean, + null: true, + description: 'Indicates whether the variable is raw.' + + field :variable_type, ::Types::Ci::VariableTypeEnum, + null: true, + description: 'Type of the variable.' + + field :environment_scope, GraphQL::Types::String, + null: true, + description: 'Scope defining the environments that can use the variable.' + + field :protected, GraphQL::Types::Boolean, + null: true, + description: 'Indicates whether the variable is protected.' + + field :masked, GraphQL::Types::Boolean, + null: true, + description: 'Indicates whether the variable is masked.' + + field :group_name, GraphQL::Types::String, + null: true, + description: 'Indicates group the variable belongs to.' + + field :group_ci_cd_settings_path, GraphQL::Types::String, + null: true, + description: 'Indicates the path to the CI/CD settings of the group the variable belongs to.' + end + # rubocop: enable Graphql/AuthorizeTypes + end +end diff --git a/app/graphql/types/project_type.rb b/app/graphql/types/project_type.rb index b10b4621534..6dfbdf765c8 100644 --- a/app/graphql/types/project_type.rb +++ b/app/graphql/types/project_type.rb @@ -352,6 +352,12 @@ module Types authorize: :admin_build, resolver: Resolvers::Ci::VariablesResolver + field :inherited_ci_variables, Types::Ci::InheritedCiVariableType.connection_type, + null: true, + description: "List of CI/CD variables the project inherited from its parent group and ancestors.", + authorize: :admin_build, + resolver: Resolvers::Ci::InheritedVariablesResolver + field :ci_cd_settings, Types::Ci::CiCdSettingType, null: true, description: 'CI/CD settings for the project.' |