From bfd709292d06078c9b2d82ea6314bdff05121a5e Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Fri, 5 Jul 2024 09:51:07 +0200 Subject: [PATCH 1/2] ci: Fix permissions for external contributors PRs Another day, another try to fix this! --- .github/workflows/external-contributors.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/external-contributors.yml b/.github/workflows/external-contributors.yml index 294f8fe10af7..418cd9788041 100644 --- a/.github/workflows/external-contributors.yml +++ b/.github/workflows/external-contributors.yml @@ -9,6 +9,9 @@ on: jobs: external_contributor: name: External Contributors + permissions: + pull-requests: write + contents: write runs-on: ubuntu-20.04 if: | github.event.pull_request.author_association != 'COLLABORATOR' From e94c229cf5f24187b4798a5d329d03507511f1d1 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Fri, 5 Jul 2024 11:41:45 +0200 Subject: [PATCH 2/2] Only run when merged --- .github/workflows/external-contributors.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/external-contributors.yml b/.github/workflows/external-contributors.yml index 418cd9788041..3682aaa88e2a 100644 --- a/.github/workflows/external-contributors.yml +++ b/.github/workflows/external-contributors.yml @@ -14,6 +14,7 @@ jobs: contents: write runs-on: ubuntu-20.04 if: | + github.event.pull_request.merged == true && github.event.pull_request.author_association != 'COLLABORATOR' && github.event.pull_request.author_association != 'MEMBER' && github.event.pull_request.author_association != 'OWNER'