From 3b4cfe18cfd4474d46c62cebd009dd9f6c3092af Mon Sep 17 00:00:00 2001 From: Dominion Date: Sat, 29 Apr 2023 17:08:58 -0400 Subject: [PATCH 1/2] Do not trigger CI when labelling a closed PR --- .github/workflows/ci-suite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-suite.yml b/.github/workflows/ci-suite.yml index 71cfcface4..bad7fe6e79 100644 --- a/.github/workflows/ci-suite.yml +++ b/.github/workflows/ci-suite.yml @@ -32,7 +32,7 @@ jobs: security-checkpoint: name: Check CI Clearance runs-on: ubuntu-latest - if: github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id + if: github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id && github.event.pull_request.state == 'open' steps: - name: Comment on new Fork PR if: github.event.action == 'opened' && !contains(github.event.pull_request.labels.*.name, 'CI Cleared') From 34f59d815dc12c59e0ad24a49d89f08769468c94 Mon Sep 17 00:00:00 2001 From: Dominion Date: Sat, 29 Apr 2023 17:19:09 -0400 Subject: [PATCH 2/2] Allow auto-approve workflow to work if I PR from my fork --- .github/workflows/auto-approve-dominions-prs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/auto-approve-dominions-prs.yml b/.github/workflows/auto-approve-dominions-prs.yml index d2dd311018..b9fd7da731 100644 --- a/.github/workflows/auto-approve-dominions-prs.yml +++ b/.github/workflows/auto-approve-dominions-prs.yml @@ -4,8 +4,7 @@ name: "Auto-Approve Dominion's PRs" on: - pull_request: - types: [opened, synchronize] + pull_request_target: branches: - dev - master