Skip to content

Commit 0beaad2

Browse files
authored
ci: run the AI review from Kong/volcano-actions (#393)
* ci: add the Claude review from Kong/volcano-actions * ci: pass the OpenAI key to the combined review * ci: rename the review stubs to ai-review * ci(review): run Codex with the ChatGPT access token
1 parent 8a91a03 commit 0beaad2

5 files changed

Lines changed: 89 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: AI Review (approvals)
2+
3+
on:
4+
pull_request_review:
5+
types: [submitted, dismissed]
6+
7+
permissions: {}
8+
9+
jobs:
10+
# A review runs the PR's own copy of this workflow, so it only finishes;
11+
# AI Review (human gate) then runs from the default branch.
12+
reviewed:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
steps:
16+
- run: echo "AI Review (human gate) re-sets ai-review/human."
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: AI Review (human gate)
2+
3+
on:
4+
workflow_run:
5+
workflows: [AI Review (approvals)]
6+
types: [completed]
7+
pull_request_target:
8+
branches: [main]
9+
types: [labeled, unlabeled]
10+
11+
permissions: {}
12+
13+
jobs:
14+
human-gate:
15+
if: github.event_name == 'workflow_run' || github.event.label.name == 'needs-human-review'
16+
uses: Kong/volcano-actions/.github/workflows/ai-review-human.yml@main
17+
permissions:
18+
contents: read
19+
pull-requests: write
20+
statuses: write
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: AI Review (merge queue)
2+
3+
on:
4+
merge_group:
5+
branches: [main]
6+
types: [checks_requested]
7+
8+
permissions: {}
9+
10+
jobs:
11+
pass:
12+
uses: Kong/volcano-actions/.github/workflows/ai-review-merge-queue.yml@main
13+
permissions:
14+
statuses: write
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: AI Review (retarget and override)
2+
3+
on:
4+
pull_request_target:
5+
branches: [main]
6+
types: [edited, labeled]
7+
8+
permissions: {}
9+
10+
jobs:
11+
retarget-or-override:
12+
if: github.event.changes.base || github.event.label.name == 'ai-review-override'
13+
uses: Kong/volcano-actions/.github/workflows/ai-review.yml@main
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
statuses: write
18+
secrets:
19+
anthropic_api_key: ${{ secrets.ANTHROPIC_CI_API_KEY }}
20+
codex_access_token: ${{ secrets.CODEX_CI_ACCESS_TOKEN }}

‎.github/workflows/ai-review.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: AI Review
2+
3+
on:
4+
pull_request_target:
5+
branches: [main]
6+
types: [opened, synchronize, reopened, ready_for_review]
7+
8+
permissions: {}
9+
10+
jobs:
11+
ai-review:
12+
uses: Kong/volcano-actions/.github/workflows/ai-review.yml@main
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
statuses: write
17+
secrets:
18+
anthropic_api_key: ${{ secrets.ANTHROPIC_CI_API_KEY }}
19+
codex_access_token: ${{ secrets.CODEX_CI_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)