From 676109e1b32682bdbdd94a9ffbd8743784f35521 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 31 Mar 2021 18:09:19 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/review.gitlab-ci.yml | 10 +++++++++- .gitlab/ci/rules.gitlab-ci.yml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to '.gitlab') 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 # -- cgit v1.2.3