From 95fca53d380a95d04e00f3954ac1fef470267552 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Wed, 12 Aug 2020 11:17:38 +0100 Subject: [PATCH] Travis: Correctly skip Hatchet on PRs from forks (#1045) The Hatchet run requires a valid Heroku login, the credentials for which are set via Travis secure environment variables, which by design are not revealed to PRs from forks. The previous conditional wasn't working as intended - the Hatchet job was still being triggered for forks from PRs. The new conditional fixes this, and also means that forks could set their own credentials via Travis environment variables if they wanted a way to run the tests in CI on their own repo. See: https://docs.travis-ci.com/user/conditions-v1 Fixes #1019. Closes @W-7918482@. [skip changelog] --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 66092b6..8dbbd30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ jobs: - name: Bash linting (shellcheck) script: make check - name: Hatchet integration tests - if: env(TRAVIS_PULL_REQUEST_SLUG) = env(TRAVIS_REPO_SLUG) + if: env(HEROKU_API_USER) IS present AND env(HEROKU_API_KEY) IS present language: ruby rvm: - 2.7