Skip to content

Commit

Permalink
fix(github): PR labeling permission
Browse files Browse the repository at this point in the history
Finally found the documentation:
"GitHub only grants read access tokens for `pull_request` events, at most. If you encounter an `Error: HttpError: Resource not accessible by integration`, it's likely due to these permission constraints. To resolve this issue, you can modify the `on:` section of your workflow to use `pull_request_target` instead of `pull_request`"
- https://github.com/actions/labeler?tab=readme-ov-file#permissions
  • Loading branch information
thorium-cfx committed Feb 5, 2024
1 parent 88a0a6c commit d31bc53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pr_opened.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Validate PR
on:
pull_request:
pull_request_target:
types: [ reopened, opened, edited, synchronize, ready_for_review ]
paths:
- 'code/**'
Expand All @@ -14,7 +14,6 @@ on:
- '!*.sh'

permissions:
issues: write
pull-requests: write

concurrency:
Expand Down

0 comments on commit d31bc53

Please sign in to comment.