From 69946b01559381eed202472aca891d6c728831de Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Sun, 30 Jul 2023 02:06:52 +0100 Subject: [PATCH] updated lock_branch.yaml --- .github/workflows/lock_branch.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lock_branch.yaml b/.github/workflows/lock_branch.yaml index 1e59786..f135707 100644 --- a/.github/workflows/lock_branch.yaml +++ b/.github/workflows/lock_branch.yaml @@ -15,6 +15,13 @@ # # See adjacent counterpart workflow unlock_brn +# XXX: Requires a PAT token to avoid this error: +# +# { +# "message": "Resource not accessible by integration", +# "documentation_url": "https://docs.github.com/rest/branches/branch-protection#update-branch-protection" +# } + --- name: Lock Branch @@ -40,7 +47,8 @@ defaults: env: BRANCH: ${{ inputs.branch || github.event.inputs.branch }} REPO: ${{ github.repository }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # XXX: Requires PAT loaded to Secrets for permission + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # XXX: API requires these fields but this is bad - could wipe out existing values PAYLOAD: '{"required_status_checks": null, "enforce_admins": false, "required_pull_request_reviews": null, "restrictions": null, "lock_branch": true}'