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 <wagi@kernel.org>
+---
name: Comment on Merged PR
on:
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
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,