From: Daniel Wagner Date: Mon, 20 Jan 2025 09:33:36 +0000 (+0100) Subject: build: fix REST API call and permissions for thanks you note X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2171cf79f0046bdf1bc6396582b064042336256b;p=users%2Fsagi%2Fnvme-cli.git 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 --- 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,