diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
commit | 419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch) | |
tree | 1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /lib/gitlab/ci/lint.rb | |
parent | 1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff) |
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'lib/gitlab/ci/lint.rb')
-rw-r--r-- | lib/gitlab/ci/lint.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/ci/lint.rb b/lib/gitlab/ci/lint.rb index 54861e2769e..f213bc83d90 100644 --- a/lib/gitlab/ci/lint.rb +++ b/lib/gitlab/ci/lint.rb @@ -25,12 +25,12 @@ module Gitlab LOG_MAX_DURATION_THRESHOLD = 2.seconds - def initialize(project:, current_user:, sha: nil) + def initialize(project:, current_user:, sha: nil, verify_project_sha: true) @project = project @current_user = current_user # If the `sha` is not provided, the default is the project's head commit (or nil). In such case, we # don't need to call `YamlProcessor.verify_project_sha!`, which prevents redundant calls to Gitaly. - @verify_project_sha = sha.present? + @verify_project_sha = verify_project_sha && sha.present? @sha = sha || project&.repository&.commit&.sha end |