Skip to content

Commit b5e5e43

Browse files
committed
update cagent-action to latest (with better permissions) [2026-03-24 16:32:51]
Signed-off-by: Derek Misler <derek.misler@docker.com>
1 parent 88eb7a4 commit b5e5e43

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

.github/workflows/pr-review.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
name: PR Review
22
on:
3-
issue_comment:
3+
issue_comment: # Enables /review command in PR comments
44
types: [created]
5-
pull_request_review_comment:
5+
pull_request_review_comment: # Captures feedback on review comments for learning
66
types: [created]
7-
pull_request_target:
7+
pull_request: # Triggers auto-review on PR open (same-repo branches only; fork PRs use /review)
88
types: [ready_for_review, opened]
9+
910
permissions:
10-
contents: read
11-
pull-requests: write
12-
issues: write
11+
contents: read # Required at top level so `GITHUB_TOKEN` for `issue_comment` events can read repository contents.
12+
1313
jobs:
1414
review:
15-
uses: docker/cagent-action/.github/workflows/review-pr.yml@6ee4111d1f2b1078cf438d955d1c1c5cc48c36c7 # latest
16-
secrets: inherit
15+
uses: docker/cagent-action/.github/workflows/review-pr.yml@b4ccf4cc94f5b34d1760709012c40975f6def2d1 # v1.3.2
16+
# Scoped to the job so other jobs in this workflow aren't over-permissioned
17+
permissions:
18+
contents: read # Required for issue_comment events to read repository files and PR diffs
19+
pull-requests: write # Post review comments and approve/request changes
20+
issues: write # Create security incident issues if secrets are detected in output
21+
checks: write # (Optional) Show review progress as a check run on the PR
22+
secrets:
23+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
24+
CAGENT_ORG_MEMBERSHIP_TOKEN: ${{ secrets.CAGENT_ORG_MEMBERSHIP_TOKEN }} # PAT with read:org scope; gates auto-reviews to org members only
25+
CAGENT_REVIEWER_APP_ID: ${{ secrets.CAGENT_REVIEWER_APP_ID }} # GitHub App ID; reviews appear as your app instead of github-actions[bot]
26+
CAGENT_REVIEWER_APP_PRIVATE_KEY: ${{ secrets.CAGENT_REVIEWER_APP_PRIVATE_KEY }} # GitHub App private key; paired with App ID above

0 commit comments

Comments
 (0)