Skip to content

Commit c46ffe7

Browse files
committed
Use github-pr-annotations reporter for protolint
Using `github-pr-review` requires elevated write permissions to the repository, just to write a review, which can compromise the security of the repository, by using the `pull_request_target` event which gives the GitHub token write access, or using a custom token which complicates the setup. To simplify things we just switch to `github-pr-annotations` reporter, which doesn't need any write permissions, and failed checks will still be shown in the diff view. https://github.com/reviewdog/reviewdog?tab=readme-ov-file#reporter-github-pr-annotations--reportergithub-pr-annotations Signed-off-by: Leandro Lucarella <[email protected]>
1 parent acc915b commit c46ffe7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ jobs:
2727
protolint:
2828
name: Check proto files with protolint
2929
runs-on: ubuntu-20.04
30-
permissions:
31-
contents: read
32-
pull-requests: write
3330

3431
steps:
3532
- name: Fetch sources
@@ -47,7 +44,7 @@ jobs:
4744
filter_mode: nofilter
4845
github_token: ${{ secrets.github_token }}
4946
protolint_flags: proto/
50-
reporter: github-pr-review
47+
reporter: github-pr-annotations
5148

5249
nox:
5350
name: Test with nox

0 commit comments

Comments
 (0)