Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 15:57:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 15:57:54 +0300
commit419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch)
tree1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /app/graphql/resolvers/ci/config_resolver.rb
parent1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff)
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'app/graphql/resolvers/ci/config_resolver.rb')
-rw-r--r--app/graphql/resolvers/ci/config_resolver.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/app/graphql/resolvers/ci/config_resolver.rb b/app/graphql/resolvers/ci/config_resolver.rb
index ec6ede58cf5..8c85a6aebea 100644
--- a/app/graphql/resolvers/ci/config_resolver.rb
+++ b/app/graphql/resolvers/ci/config_resolver.rb
@@ -30,11 +30,20 @@ module Resolvers
required: false,
description: 'Run pipeline creation simulation, or only do static check.'
- def resolve(project_path:, content:, sha: nil, dry_run: false)
+ argument :skip_verify_project_sha, GraphQL::Types::Boolean,
+ required: false,
+ alpha: { milestone: '16.5' },
+ description: "If the provided `sha` is found in the project's repository but is not " \
+ "associated with a Git reference (a detached commit), the verification fails and a " \
+ "validation error is returned. Otherwise, verification passes, even if the `sha` is " \
+ "invalid. Set to `true` to skip this verification process."
+
+ def resolve(project_path:, content:, sha: nil, dry_run: false, skip_verify_project_sha: false)
project = authorized_find!(project_path: project_path)
result = ::Gitlab::Ci::Lint
- .new(project: project, current_user: context[:current_user], sha: sha)
+ .new(project: project, current_user: context[:current_user], sha: sha,
+ verify_project_sha: !skip_verify_project_sha)
.validate(content, dry_run: dry_run)
response(result)