-
Notifications
You must be signed in to change notification settings - Fork 45
33 lines (30 loc) · 1.1 KB
/
Copy pathpr-autotriage.yaml
File metadata and controls
33 lines (30 loc) · 1.1 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
name: PR autotriage
on:
pull_request:
types:
- opened
- ready_for_review
workflow_dispatch:
inputs:
pr_url:
description: URL of the pull request to review
required: true
type: string
permissions: {}
jobs:
fire:
name: Fire routine
runs-on: ubuntu-latest
# `opened` fires for draft PRs too, but those get their own `ready_for_review` event later
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false
steps:
- env:
TOKEN: ${{ secrets.AUTOREVIEW_CLAUDE_CODE_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url || inputs.pr_url }}
run: |
curl --fail-with-body -X POST https://api.anthropic.com/v1/claude_code/routines/trig_01DYGd61hv2gZAmR2NFPETof/fire \
-H "Authorization: Bearer $TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: experimental-cc-routine-2026-04-01" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg url "$PR_URL" '{ text: "Review the pull request at \($url)" }')"