Skip to content

Commit 2171cf7

Browse files
committed
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 <[email protected]>
1 parent 1d39c71 commit 2171cf7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/thanks.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Comment on Merged PR
23

34
on:
@@ -9,6 +10,9 @@ jobs:
910
comment-on-merge:
1011
if: github.event.pull_request.merged == true
1112
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
pull-requests: write
1216

1317
steps:
1418
- name: Comment on merged PR
@@ -18,7 +22,7 @@ jobs:
1822
const prNumber = context.payload.pull_request.number;
1923
const comment = 'Thanks for your contribution!';
2024
21-
await github.issues.createComment({
25+
await github.rest.issues.createComment({
2226
owner: context.repo.owner,
2327
repo: context.repo.repo,
2428
issue_number: prNumber,

0 commit comments

Comments
 (0)