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:
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/ci/review.gitlab-ci.yml10
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml2
2 files changed, 10 insertions, 2 deletions
diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml
index fefadab16e4..1134a76a6b8 100644
--- a/.gitlab/ci/review.gitlab-ci.yml
+++ b/.gitlab/ci/review.gitlab-ci.yml
@@ -234,7 +234,15 @@ danger-review:
- run_timed_command "bundle install --jobs=$(nproc) --path=vendor --retry=3 --quiet --with danger"
- run_timed_command "retry yarn install --frozen-lockfile"
script:
- - run_timed_command "bundle exec danger --fail-on-errors=true --verbose"
+ - >
+ if [ -z "$DANGER_GITLAB_API_TOKEN" ]; then
+ # Force danger to skip CI source GitLab and fallback to "local only git repo".
+ unset GITLAB_CI
+ # We need to base SHA to help danger determine the base commit for this shallow clone.
+ run_timed_command "bundle exec danger dry_run --fail-on-errors=true --verbose --base='$CI_MERGE_REQUEST_DIFF_BASE_SHA'"
+ else
+ run_timed_command "bundle exec danger --fail-on-errors=true --verbose"
+ fi
update-danger-review-cache:
extends:
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 39522f7b60c..df2edd04809 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -1110,7 +1110,7 @@
.review:rules:danger:
rules:
- - if: '$DANGER_GITLAB_API_TOKEN && $CI_MERGE_REQUEST_IID'
+ - if: '$CI_MERGE_REQUEST_IID'
###############
# Setup rules #