Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/pr-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ jobs:
echo "::add-mask::$token"
echo "ANTHROPIC_WIF_TOKEN=$token" >> "$GITHUB_ENV"
- name: Run PR-Agent
# PR-Agent v0.50.0, the `0.50.0-github_action` image by digest. The action
# repository only wraps a rolling image tag, so the digest is the real pin
# (PR-Agent SECURITY.md). To upgrade, take the digest of the new
# `<version>-github_action` tag on Docker Hub.
uses: docker://pragent/pr-agent@sha256:548e894a88071180832b2f4233f734d0acd0db1a879e2fcbaa70bac8b8372ebe
# The org's wrapper action runs the PR-Agent v0.50.0 image by digest
# (actions/pr-agent/action.yml). A direct `docker://` step fails to start in
# repositories that allow only listed actions; an org action is always allowed.
# After a change to the wrapper, pin its new commit here.
uses: tilorahdotco/.github/actions/pr-agent@aa9a0efa08f43d1bce5711130246d485236bf939
env:
# LiteLLM sends an `sk-ant-oat` token as `Authorization: Bearer`.
ANTHROPIC.KEY: ${{ env.ANTHROPIC_WIF_TOKEN }}
Expand Down
10 changes: 10 additions & 0 deletions actions/pr-agent/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: PR-Agent (pinned image)
description: >-
Runs PR-Agent v0.50.0 from its `0.50.0-github_action` image by digest. The upstream
action only wraps a rolling image tag, so the digest is the real pin (PR-Agent
SECURITY.md). It lives in this repository so that repositories that allow only
listed actions and require SHA pins can run it. To upgrade, take the digest of the
new `<version>-github_action` tag on Docker Hub. Settings come from the step's env.
runs:
using: docker
image: docker://pragent/pr-agent@sha256:548e894a88071180832b2f4233f734d0acd0db1a879e2fcbaa70bac8b8372ebe
5 changes: 4 additions & 1 deletion docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ jobs:
runner: instabox-small # public repositories: ubuntu-latest
```

- A repository that requires SHA pins (intersects) cannot use `@main`. It pins the
commit of this workflow instead, and that exact commit must be listed in the
rule's condition (Claude Console, Workload identity, rule `pr-agent-org`).
- Tokens act as the `pr-agents` service account and work only in the `pr-cicd`
Anthropic workspace, which has its own spend limit. No repository needs an
Anthropic secret.
Expand All @@ -232,7 +235,7 @@ jobs:
`[pr_reviewer] extra_instructions`. No other PR-Agent command runs.
- A fork PR gets no automatic review. A maintainer's `/review` comment on it runs
from the default branch and reviews it; PR-Agent reads the diff and runs no PR code.
- The PR-Agent image is pinned by digest in the workflow. Use a runner with Docker:
- The PR-Agent image is pinned by digest in the org action `actions/pr-agent`, which the workflow pins by commit. Use a runner with Docker:
instabox or GitHub-hosted, not the `cjbb2-ci` fallback runner.
- A failed exchange fails the job with Anthropic's error type. The deny reason is
in the Claude Console under Workload identity, History.