Skip to content

Commit c72373b

Browse files
committed
ci: Fix pr-code-format permissions for private forks
The action requires the ability to change the contents of a pull request (by adding the formatting-related comment) which is only possible through the `write` permission, but if this permission is missing, potential private forks with Actions enabled will break, and because the action triggers on `pull_request_target` even a PR initially fixing this issue downstream will not exhibit the fix until merged.
1 parent 93c2577 commit c72373b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/pr-code-format.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: "Check code formatting"
22

33
permissions:
44
contents: read
5+
issues: write
6+
pull-requests: write
57

68
on:
79
pull_request:

0 commit comments

Comments
 (0)