diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-04 15:15:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-04 15:15:02 +0300 |
commit | f00510286b6ccda154c4926503397590a8851939 (patch) | |
tree | c4cd69ef2d0d6dd5abf30e3963ac00ead7421a19 /app/graphql | |
parent | 9e5c2e7342d1393f90e74a2ae4b3f27492c22e1f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql')
-rw-r--r-- | app/graphql/types/project_type.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/app/graphql/types/project_type.rb b/app/graphql/types/project_type.rb index a67ead051c2..6530894562b 100644 --- a/app/graphql/types/project_type.rb +++ b/app/graphql/types/project_type.rb @@ -25,8 +25,13 @@ module Types alpha: { milestone: '15.3' }, description: 'CI/CD config variable.' do argument :sha, GraphQL::Types::String, - required: true, - description: 'Sha.' + required: false, + description: 'Sha.', + deprecated: { reason: 'Use `ref`', milestone: '15.11' } + + argument :ref, GraphQL::Types::String, + required: false, # Make required when `sha` argument is removed + description: 'Ref.' end field :full_path, GraphQL::Types::ID, @@ -645,8 +650,10 @@ module Types # Even if the parameter name is `sha`, it is actually a ref name. We always send `ref` to the endpoint. # See: https://gitlab.com/gitlab-org/gitlab/-/issues/389065 - def ci_config_variables(sha:) - result = ::Ci::ListConfigVariablesService.new(object, context[:current_user]).execute(sha) + # Remove `sha` argument and make `ref` required in a future release + # See: https://gitlab.com/gitlab-org/gitlab/-/issues/404493 + def ci_config_variables(ref: nil, sha: nil) + result = ::Ci::ListConfigVariablesService.new(object, context[:current_user]).execute(ref || sha) return if result.nil? |