-
Notifications
You must be signed in to change notification settings - Fork 8
ci: let PR comments trigger a Claude review reconcile round #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,14 +54,17 @@ jobs: | |
| # rather than cancelling it, so a partial run never leaves comments/threads | ||
| # in an inconsistent state. | ||
| concurrency: | ||
| group: claude-pr-review-${{ github.event.pull_request.number }} | ||
| group: claude-pr-review-${{ github.event.pull_request.number || github.event.issue.number }} | ||
| cancel-in-progress: false | ||
| if: | | ||
| github.event_name == 'pull_request' && | ||
| (github.event.action == 'opened' || | ||
| github.event.action == 'synchronize' || | ||
| github.event.action == 'ready_for_review' || | ||
| github.event.action == 'reopened') | ||
| (github.event_name == 'pull_request' && | ||
| (github.event.action == 'opened' || | ||
| github.event.action == 'synchronize' || | ||
| github.event.action == 'ready_for_review' || | ||
| github.event.action == 'reopened')) || | ||
| (github.event_name == 'issue_comment' && | ||
| github.event.issue.pull_request != null && | ||
| github.event.comment.user.login != 'mega-maxwell[bot]') | ||
|
Comment on lines
+65
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a member, collaborator, or owner posts a top-level PR comment containing Useful? React with 👍 / 👎. |
||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 30 | ||
| permissions: | ||
|
|
@@ -83,6 +86,7 @@ jobs: | |
|
|
||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || '' }} | ||
| token: ${{ steps.app-token.outputs.token }} | ||
| persist-credentials: false | ||
| submodules: recursive | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a comment on a fork-based PR,
issue_commentruns the trusted default-branch workflow with repository secrets available, and this condition lets any commenter trigger the job; the subsequent checkout loads the fork's mutable PR head before invoking Claude with both the OAuth secret and a repository installation token. A fork author can therefore place hostile agent instructions in the branch and post an ordinary comment to make the privileged agent process them, bypassing the secret withholding that protects normalpull_requestruns from forks. Gate this path on a trusted author association, or run fork reconciliation without privileged credentials and write access.Useful? React with 👍 / 👎.