mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-13 12:32:48 +02:00
ci: use GITHUB_TOKEN instead of PAT for PR severity workflow
The PR severity classifier only needs to run `gh pr view`, `gh pr edit`
(labels), and `gh pr comment`. All three operations are fully covered by
the built-in GITHUB_TOKEN given the existing permissions block:
permissions:
contents: read
pull-requests: write
issues: write
The workflow uses `pull_request_target`, which runs in the base repo
context, so GITHUB_TOKEN has write access even for fork PRs.
Inspection of the claude-code-action@v1 source confirmed that the only
internal call that would require `contents: write` is branch deletion,
which is never exercised here because Claude's tools are locked down to
`gh pr view/edit/comment` via --allowedTools.
This removes the dependency on the PR_SEVERITY_BOT_TOKEN PAT secret.
This commit is contained in:
parent
167f03bb32
commit
77c566f2fa
1 changed files with 1 additions and 1 deletions
2
.github/workflows/pr-severity.yml
vendored
2
.github/workflows/pr-severity.yml
vendored
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
uses: anthropics/claude-code-action@v1
|
||||
with:
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
github_token: ${{ secrets.PR_SEVERITY_BOT_TOKEN }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Allow any user since this workflow only reads PR metadata via API
|
||||
# and doesn't execute any code from the PR. Tool permissions are
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue