From 7d0462ce5ee4d7644ed1ca9e31ddbfb88f025a76 Mon Sep 17 00:00:00 2001 From: Marick van Tuil Date: Mon, 29 Jan 2024 21:33:19 +0100 Subject: [PATCH] Wip access check --- .github/workflows/run-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 28b13e2..3f951ec 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,7 +12,7 @@ jobs: name: Access check steps: - name: Ensure pull-request is safe to run - uses: actions/github-script@v5 + uses: actions/github-script@v7 with: github-token: ${{secrets.GITHUB_TOKEN}} script: | @@ -28,7 +28,8 @@ jobs: const labels = response.data.map(label => label.name); let hasLabel = labels.includes('safe-to-test') - if (context.eventName === 'synchronize' && hasLabel) { + console.log(context.payload) + if (context.payload.action === 'synchronize' && hasLabel) { hasLabel = false await github.rest.issues.removeLabel({ owner,