|
1 | 1 | name: PR Review |
2 | 2 |
|
3 | 3 | on: |
4 | | - pull_request_target: |
| 4 | + pull_request: |
5 | 5 | types: [opened, ready_for_review] |
6 | 6 | issue_comment: |
7 | 7 | types: [created] |
8 | 8 | pull_request_review_comment: |
9 | 9 | types: [created] |
10 | 10 |
|
11 | | -# Serialize reviews per PR; do not cancel in-progress runs |
12 | | -# so no review is silently dropped mid-execution. |
13 | | -concurrency: |
14 | | - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number }} |
15 | | - cancel-in-progress: false |
16 | | - |
17 | 11 | jobs: |
18 | 12 | review: |
19 | | - # Only run on the upstream repo (not forks) to prevent credential leaks. |
20 | | - # Skip draft PRs (ready_for_review will fire when promoted). |
21 | | - # Skip bot actors to avoid reviewing Dependabot and automation PRs. |
22 | | - # Require collaborator-level access for comment-triggered events. |
23 | | - # Only trigger on PR comments, not plain issue comments. |
24 | | - if: >- |
25 | | - github.repository == 'docker/compose' && |
26 | | - (github.event_name != 'pull_request_target' || github.event.pull_request.draft == false) && |
27 | | - (github.event_name == 'pull_request_target' || |
28 | | - (github.event_name == 'issue_comment' && |
29 | | - github.event.issue.pull_request && |
30 | | - contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) || |
31 | | - (github.event_name == 'pull_request_review_comment' && |
32 | | - contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))) && |
33 | | - !endsWith(github.actor, '[bot]') |
34 | 13 | uses: docker/cagent-action/.github/workflows/review-pr.yml@d98096f432f2aea5091c811852c4da804e60623a # v1.4.1 |
35 | | - secrets: |
36 | | - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |
37 | | - CAGENT_ORG_MEMBERSHIP_TOKEN: ${{ secrets.CAGENT_ORG_MEMBERSHIP_TOKEN }} |
38 | | - CAGENT_REVIEWER_APP_ID: ${{ secrets.CAGENT_REVIEWER_APP_ID }} |
39 | | - CAGENT_REVIEWER_APP_PRIVATE_KEY: ${{ secrets.CAGENT_REVIEWER_APP_PRIVATE_KEY }} |
40 | 14 | permissions: |
41 | 15 | contents: read # to fetch code |
42 | 16 | pull-requests: write # to post review comments |
|
0 commit comments