Repository navigation
ci: PR-Agent review on Claude through the org workflow, no stored key #134
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d1d6144
ci: PR-Agent review on Claude through the org workflow, no stored key
pbember 27f2b0b
ci(pr-agent): keep queued commands when ordinary comments arrive
pbember c7cc8f0
ci(pr-agent): pin the shared workflow with Haiku 5.5 for /ask and /im…
pbember 1d3822d
ci(pr-agent): call the shared workflow at main; queue only real commands
pbember 4c12b9c
ci(pr-agent): give each comment its own run group
pbember File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # AI code review with PR-Agent (open source, MIT) on Claude, from the org's shared | ||
| # workflow (tilorahdotco/.github, docs/USAGE.md#pr-agent-review). No model key is | ||
| # stored: each run exchanges GitHub's identity token for a 15-minute Anthropic token. | ||
| # - Reviews a PR when it opens, reopens or leaves draft. | ||
| # - Comment `/review` to run it again, `/improve` for code suggestions, or | ||
| # `/ask <question>`. Comment commands use this workflow from main. | ||
| # Keep this file's name and the `@main` reference: the federation rule gives a token only | ||
| # to the shared workflow at its `main`, called from `.github/workflows/pr-agent.yml`. | ||
| name: PR-Agent review | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, ready_for_review] | ||
| issue_comment: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
| id-token: write # GitHub's identity token, exchanged for the Anthropic token | ||
|
|
||
| concurrency: | ||
| # One review at a time per PR. Every comment gets its own group, so a command is | ||
| # never replaced by a later comment or event; a command can run beside a review. | ||
| group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event.comment.id || 'review' }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| review: | ||
| name: PR-Agent review | ||
| # Only PR events and the three commands start a run. The shared workflow checks | ||
| # again: drafts, fork PRs, the author's write access and `--config.` arguments. | ||
| if: github.event_name == 'pull_request' || (github.event.issue.pull_request && (startsWith(github.event.comment.body, '/review') || startsWith(github.event.comment.body, '/ask') || startsWith(github.event.comment.body, '/improve'))) | ||
| uses: tilorahdotco/.github/.github/workflows/pr-agent.yml@main | ||
| with: | ||
| runner: ubuntu-latest # public repository: GitHub-hosted only | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Add
queue: maxso pending comment commands are kept.With
cancel-in-progress: false, a running review is not canceled. A pending run is still replaced, though. If/askis pending and/improveis posted, the/askrun is canceled.queue: maxlets up to 100 runs wait in the group. Runs still execute one at a time. The key is valid here becausecancel-in-progressisfalse. (docs.github.com)Suggested fix
Committable suggestion