From 2171cf79f0046bdf1bc6396582b064042336256b Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 20 Jan 2025 10:33:36 +0100 Subject: [PATCH] build: fix REST API call and permissions for thanks you note The github action needs to use the correct REST API and the write permission to be able to comment on the issue/pull request. Signed-off-by: Daniel Wagner --- .github/workflows/thanks.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/thanks.yml b/.github/workflows/thanks.yml index fc5be9d5..15c00bdf 100644 --- a/.github/workflows/thanks.yml +++ b/.github/workflows/thanks.yml @@ -1,3 +1,4 @@ +--- name: Comment on Merged PR on: @@ -9,6 +10,9 @@ jobs: comment-on-merge: if: github.event.pull_request.merged == true runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write steps: - name: Comment on merged PR @@ -18,7 +22,7 @@ jobs: const prNumber = context.payload.pull_request.number; const comment = 'Thanks for your contribution!'; - await github.issues.createComment({ + await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: prNumber, -- 2.50.1