From dddb154ec7b02c243545fe18e090e189fc0e4a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Wed, 3 Jun 2020 15:45:28 +0200 Subject: [PATCH] Only run Danger if DANGER_GITLAB_API_TOKEN is set Prevent the Danger GitLab CI job from failing when the GitLab API key to use is not set. (cherry picked from commit 2c90438583b4a7c44ec7be06ad93962f53faaabb) --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff62185a16..e14eff0561 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -428,7 +428,10 @@ danger: script: - danger-python ci -f only: - - merge_requests + refs: + - merge_requests + variables: + - $DANGER_GITLAB_API_TOKEN flake8: <<: *default_triggering_rules