-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpr-review-github.yaml
More file actions
50 lines (48 loc) · 1.6 KB
/
pr-review-github.yaml
File metadata and controls
50 lines (48 loc) · 1.6 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
apiVersion: agentic.dev/v0
kind: Workflow
metadata:
name: pr-review-github
spec:
description: |
Live GitHub path: fetch PR JSON and unified diff via the GitHub REST API, run a structured review,
then post or update one issue comment (comment_strategy replace: PATCH <!-- agentic-review --> or POST once).
Policy-gated unless you pass --approve for tool.github.pull_request.post_comment.
Requires GITHUB_TOKEN and network access to GITHUB_API_URL (default https://api.github.com).
policy: guarded-writes
input:
schema: ./schemas/pr-review-github-input.json
steps:
- id: fetch_pr
uses: tool.github.pull_request.get
with:
owner: ${input.owner}
repo: ${input.repo}
number: ${input.number}
- id: fetch_diff
uses: tool.github.pull_request.diff
with:
owner: ${input.owner}
repo: ${input.repo}
number: ${input.number}
- id: review_diff
agent: reviewer
with:
pull_request: ${steps.fetch_pr.output.pull_request}
diff: ${steps.fetch_diff.output.diff}
- id: post_comment
uses: tool.github.pull_request.post_comment
with:
owner: ${input.owner}
repo: ${input.repo}
number: ${input.number}
comment_strategy: replace
body: |
## Automated review
${steps.review_diff.output.summary}
${steps.review_diff.output.findings}
output:
value:
pull_request: ${steps.fetch_pr.output.pull_request}
diff: ${steps.fetch_diff.output.diff}
review: ${steps.review_diff.output}
comment: ${steps.post_comment.output}