-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsumer-workflow.yml
More file actions
60 lines (54 loc) · 2.52 KB
/
consumer-workflow.yml
File metadata and controls
60 lines (54 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copy this into a consuming repo as `.github/workflows/pr-review.yml`.
# Replace <owner> with the org/user that hosts the agents repo.
#
# Default model is github/openai/gpt-4.1 via GitHub Models — the built-in
# GITHUB_TOKEN authenticates it, so no API key is needed, but the token needs
# `models: read` (below). On a free plan it's capped at ~8k tokens/request
# (too small for big diffs); a paid plan lifts that. To use Anthropic instead,
# see the block at the bottom.
name: PR Review
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
models: read
jobs:
review:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4 # so the agent can see this repo's .agents/ overrides
- uses: <owner>/agents/actions/pr-review@main # @main = always-latest skills/prompts; pin @v1 for reproducible
with:
pr-number: ${{ github.event.pull_request.number }}
# Optional:
# model: github/openai/gpt-4o # another GitHub model
# override-mode: merge # or: replace
# --- Or review with Anthropic instead of GitHub Models -----------------
# Drop `models: read` above, add ANTHROPIC_API_KEY as a repo secret, and
# use this step instead. Provider credentials go through env:, not action
# inputs — pi-ai reads them from the inherited process environment.
#
# - uses: <owner>/agents/actions/pr-review@main
# env:
# ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
# with:
# pr-number: ${{ github.event.pull_request.number }}
# model: anthropic/claude-sonnet-4-6
# --- Or review with Kimi K2.6 on Cloudflare Workers AI -----------------
# 262k context window, reasoning, vision, tool calling.
# Drop `models: read` above, add CLOUDFLARE_API_KEY (token with
# `Workers AI` → Read scope) and CLOUDFLARE_ACCOUNT_ID as repo secrets,
# then use this step instead. Provider credentials go through env:, not
# action inputs — pi-ai's cloudflare-workers-ai provider reads them from
# the inherited process environment.
#
# - uses: <owner>/agents/actions/pr-review@main
# env:
# CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
# CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# with:
# pr-number: ${{ github.event.pull_request.number }}
# model: cloudflare-workers-ai/@cf/moonshotai/kimi-k2.6