From 2c90438583b4a7c44ec7be06ad93962f53faaabb 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. --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bad15c639a..a02f33d4f1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -427,7 +427,10 @@ danger: script: - danger-python ci -f only: - - merge_requests + refs: + - merge_requests + variables: + - $DANGER_GITLAB_API_TOKEN flake8: <<: *default_triggering_rules