.github: grant write permissions for PR comments in license check workflow

Grant write permissions to the check-license-header workflow to enable
commenting on pull requests. This fixes the "Resource not accessible by
integration" HTTP error that occurred when the workflow attempted to
create comments.

The permission is required according to GitHub's API documentation for
creating issue comments.

see also https://docs.github.com/en/rest/issues/comments?apiVersion=2022-11-28#create-an-issue-comment

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
Kefu Chai
2025-02-07 16:05:11 +08:00
parent 342b640b4b
commit 06b4abce56

View File

@@ -14,6 +14,8 @@ jobs:
check-license-headers:
name: Check License Headers
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout code