From 500573df33cf64d71a439ddfb9fb9f28b916f595 Mon Sep 17 00:00:00 2001 From: Justin Hiemstra Date: Wed, 27 Nov 2024 20:35:12 +0000 Subject: [PATCH 1/2] Try using bearer token and pinning GH api version --- .github/workflows/enforce-issue-labelling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/enforce-issue-labelling.yml b/.github/workflows/enforce-issue-labelling.yml index 0f5c6d0f6..46696a3bd 100644 --- a/.github/workflows/enforce-issue-labelling.yml +++ b/.github/workflows/enforce-issue-labelling.yml @@ -22,7 +22,7 @@ jobs: REPO_OWNER=$(jq -r '.repository.owner.login' $GITHUB_EVENT_PATH) REPO_NAME=$(jq -r '.repository.name' $GITHUB_EVENT_PATH) curl -X PATCH -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/issues/$ISSUE_NUMBER \ -d '{"state":"open"}' exit 1 From e0ec2cf986aa5198745ab9b93ecb48a333c3c3bb Mon Sep 17 00:00:00 2001 From: Justin Hiemstra Date: Wed, 27 Nov 2024 20:35:43 +0000 Subject: [PATCH 2/2] Actually make the changes --- .github/workflows/enforce-issue-labelling.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/enforce-issue-labelling.yml b/.github/workflows/enforce-issue-labelling.yml index 46696a3bd..113fccd28 100644 --- a/.github/workflows/enforce-issue-labelling.yml +++ b/.github/workflows/enforce-issue-labelling.yml @@ -21,8 +21,11 @@ jobs: ISSUE_NUMBER=$(jq -r '.issue.number' $GITHUB_EVENT_PATH) REPO_OWNER=$(jq -r '.repository.owner.login' $GITHUB_EVENT_PATH) REPO_NAME=$(jq -r '.repository.name' $GITHUB_EVENT_PATH) - curl -X PATCH -H "Accept: application/vnd.github.v3+json" \ + curl -L \ + -X PATCH \ + -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/issues/$ISSUE_NUMBER \ -d '{"state":"open"}' exit 1