Skip to content

Commit 3059b33

Browse files
committed
fix: add issues read permission for pr-comments
1 parent 6e021a9 commit 3059b33

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/commit-check.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ name: Commit Check
22

33
on:
44
pull_request:
5-
branches: 'main'
5+
branches: ['main']
66
workflow_dispatch:
77

88
jobs:
99
commit-check:
1010
runs-on: ubuntu-latest
1111
permissions: # use permissions because of use pr-comments
1212
contents: read
13+
issues: read
1314
pull-requests: write
1415
steps:
1516
- uses: actions/checkout@v5

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
runs-on: ubuntu-latest
4747
permissions: # use permissions because use of pr-comments
4848
contents: read
49+
issues: read
4950
pull-requests: write
5051
steps:
5152
- uses: actions/checkout@v5
@@ -123,7 +124,9 @@ jobs:
123124
- Default: `false`
124125

125126
> [!IMPORTANT]
126-
> `pr-comments` is an experimental feature. By default, it's disabled. To use it, you need to set `GITHUB_TOKEN` in the GitHub Action.
127+
> `pr-comments` is an experimental feature. By default, it's disabled. To use it, you need to:
128+
> - Set `GITHUB_TOKEN` in the GitHub Action
129+
> - Add `issues: read` permission (required because PRs use the Issues API)
127130
>
128131
> This feature currently doesn’t work with forked repositories. For more details, refer to issue [#77](https://github.com/commit-check/commit-check-action/issues/77).
129132

0 commit comments

Comments
 (0)