diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml new file mode 100644 index 0000000..dc427de --- /dev/null +++ b/.github/workflows/pr-agent.yml @@ -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 `. 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index d474716..e8b9afb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project follows [Semantic Versioning](https://semver.org/). +## 2026-11-19 + +- PR-Agent reviews PRs on Claude Opus 5.5 (and answers `/ask` and `/improve` with Claude Haiku 5.5) through the org's shared workflow, with no stored model key: each run exchanges GitHub's identity token for a 15-minute Anthropic token in the `pr-cicd` workspace. Comment `/review`, `/improve` or `/ask` on a PR. + ## 2026-11-18 - Antigravity CLI allowance no longer stops refreshing when MeterUsage was