From cfdbc1de55cc1897f10767f09ecfb6f53a51105e Mon Sep 17 00:00:00 2001 From: Oliver Barnwell Date: Thu, 21 Sep 2023 16:41:46 +0100 Subject: [PATCH] remove external contrib pr_target check --- .github/workflows/cypress-e2e-chrome.yml | 30 ++--------------------- .github/workflows/cypress-e2e-firefox.yml | 28 +-------------------- 2 files changed, 3 insertions(+), 55 deletions(-) diff --git a/.github/workflows/cypress-e2e-chrome.yml b/.github/workflows/cypress-e2e-chrome.yml index 9e2b74b73..1b6129eec 100644 --- a/.github/workflows/cypress-e2e-chrome.yml +++ b/.github/workflows/cypress-e2e-chrome.yml @@ -4,38 +4,12 @@ on: branches: - main pull_request: - pull_request_target: - types: - - labeled jobs: - label_check: - runs-on: ubuntu-latest - outputs: - authorized: ${{ steps.label_check.outputs.authorized }} - steps: - - name: Check if authorized label is present - id: label_check - run: | - LABEL_NAME="CI Approved" - PR_LABELS=$(jq '.pull_request.labels[].name' $GITHUB_EVENT_PATH | tr '\n' ' ') - if [[ ${PR_LABELS} =~ ${LABEL_NAME} ]]; then - echo "Authorized label found." - echo "::set-output name=authorized::true" - else - echo "Authorized label not found." - echo "::set-output name=authorized::false" - fi - cypress-e2e-chrome: name: Cypress E2E Chrome runs-on: ubuntu-20.04 - # Don't run the e2e tests for dependabot prs or if the PR is not labeled as 'safe to test'. - if: | - ${{ github.event.pull_request.user.login == 'dependabot[bot]' && - needs.label_check.outputs.authorized == 'true' }} - - # Only run the e2e tests if a maintainer has labeled the PR as 'safe to test'. - needs: [label_check] + # Don't run the e2e tests for dependabot prs. + if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }} timeout-minutes: 15 strategy: # when one test fails, DO NOT cancel the other diff --git a/.github/workflows/cypress-e2e-firefox.yml b/.github/workflows/cypress-e2e-firefox.yml index 2043c1dff..ee3ee0e37 100644 --- a/.github/workflows/cypress-e2e-firefox.yml +++ b/.github/workflows/cypress-e2e-firefox.yml @@ -4,38 +4,12 @@ on: branches: - main pull_request: - pull_request_target: - types: - - labeled jobs: - label_check: - runs-on: ubuntu-latest - outputs: - authorized: ${{ steps.label_check.outputs.authorized }} - steps: - - name: Check if authorized label is present - id: label_check - run: | - LABEL_NAME="CI Approved" - PR_LABELS=$(jq '.pull_request.labels[].name' $GITHUB_EVENT_PATH | tr '\n' ' ') - if [[ ${PR_LABELS} =~ ${LABEL_NAME} ]]; then - echo "Authorized label found." - echo "::set-output name=authorized::true" - else - echo "Authorized label not found." - echo "::set-output name=authorized::false" - fi - cypress-e2e-firefox: name: Cypress E2E Firefox runs-on: ubuntu-20.04 # Don't run the e2e tests for dependabot prs or if the PR is not labeled as 'safe to test'. - if: | - ${{ github.event.pull_request.user.login == 'dependabot[bot]' && - needs.label_check.outputs.authorized == 'true' }} - - # Only run the e2e tests if a maintainer has labeled the PR as 'safe to test'. - needs: [label_check] + if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }} timeout-minutes: 15 strategy: # when one test fails, DO NOT cancel the other