From ade37c1dfcf92d0301289d4903716a849f1b456b Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Wed, 31 Mar 2021 10:29:17 -0700 Subject: [PATCH] Teach ci/init-external-repos.sh to consider user permissions Any errors while setting up external/private test repo should fail the task for PRs submitted by a user with write/admin permission. --- CHANGES | 7 +++++++ VERSION | 2 +- ci/init-external-repos.sh | 8 +++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 6c339b6202..c10ed9990d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,11 @@ +4.1.0-dev.448 | 2021-03-31 10:29:17 -0700 + + * Teach ci/init-external-repos.sh to consider user permissions (Jon Siwek, Corelight) + + Any errors while setting up external/private test repo should fail the + task for PRs submitted by a user with write/admin permission. + 4.1.0-dev.447 | 2021-03-31 09:55:05 -0700 * CI: Add OpenSUSE Leap 15.2 (Johanna Amann, Corelight) diff --git a/VERSION b/VERSION index 6dde708b58..24757066bf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.0-dev.447 +4.1.0-dev.448 diff --git a/ci/init-external-repos.sh b/ci/init-external-repos.sh index 40bc07c243..562c567cee 100755 --- a/ci/init-external-repos.sh +++ b/ci/init-external-repos.sh @@ -39,7 +39,13 @@ if [[ -n "${CIRRUS_CI}" ]] && [[ ! -d zeek-testing-private ]]; then # the key is also available in PRs for people with write access to the # repo, so we can still try for those cases). if [[ -n "${CIRRUS_PR}" ]]; then - set +e + if [[ "${CIRRUS_USER_PERMISSION}" == "write" ]]; then + set -e + elif [[ "${CIRRUS_USER_PERMISSION}" == "admin" ]]; then + set -e + else + set +e + fi else set -e fi