Skip to content

Commit e2ba7b6

Browse files
authored
update cagent-action to latest (with better permissions) (#24523)
## Description Updates `.github/workflows/pr-review.yml` to pin `docker/cagent-action`'s reusable review workflow to `v1.3.1` by SHA, switch from `secrets: inherit` to explicit secret passing. ## Related issues or tickets - [docker/gordon#311](docker/gordon#311) ## Reviews - [x] Technical review Closes: docker/gordon#311 Signed-off-by: Derek Misler <derek.misler@docker.com>
2 parents 955c955 + 23e0b78 commit e2ba7b6

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

.github/workflows/pr-review.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# Thin wrapper around docker/cagent-action's reusable review workflow.
2+
# Fork detection, org-membership gating, and review posting are all handled
3+
# by the reusable workflow, so no additional guards are needed here.
4+
#
5+
# Triggers:
6+
# issue_comment — `/review` slash command (works for fork contributors).
7+
# pull_request_review_comment — captures feedback for agent learning.
18
name: PR Review
29

310
on:
@@ -8,13 +15,20 @@ on:
815

916
permissions:
1017
contents: read
11-
pull-requests: write
12-
issues: write
1318

1419
jobs:
1520
review:
16-
uses: docker/cagent-action/.github/workflows/review-pr.yml@3a12dbd0c6cd7dda3d4e05f24f0143c9701456de # latest
17-
secrets: inherit
21+
uses: docker/cagent-action/.github/workflows/review-pr.yml@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1
22+
permissions:
23+
contents: read # Read repo files and PR diffs
24+
pull-requests: write # Post review comments, approve / request changes
25+
issues: write # Create security-incident issues if secrets leak into output
26+
checks: write # Show review progress as a check run on the PR
27+
secrets:
28+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
29+
CAGENT_ORG_MEMBERSHIP_TOKEN: ${{ secrets.CAGENT_ORG_MEMBERSHIP_TOKEN }}
30+
CAGENT_REVIEWER_APP_ID: ${{ secrets.CAGENT_REVIEWER_APP_ID }}
31+
CAGENT_REVIEWER_APP_PRIVATE_KEY: ${{ secrets.CAGENT_REVIEWER_APP_PRIVATE_KEY }}
1832
with:
1933
add-prompt-files: STYLE.md,COMPONENTS.md
2034
additional-prompt: |
@@ -72,4 +86,4 @@ jobs:
7286
- **medium**: Could confuse users or violates style guide (AI-isms, scope inflation, unclear instructions, markdown formatting)
7387
- **low**: Minor suggestions (rarely report)
7488
75-
Most issues should be MEDIUM. HIGH is for critical problems only.
89+
Most issues should be MEDIUM. HIGH is for critical problems only.

0 commit comments

Comments
 (0)