Skip to content

Commit 540236c

Browse files
add claude code new workflow
1 parent b57e344 commit 540236c

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "+ Claude Code / Documentation Review"
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
documentation-review:
13+
name: Review doc changes
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # TODO: why do we need fetch depth 0?
21+
22+
- name: Get changed files # TODO: test locally
23+
id: changed-files
24+
run: |
25+
echo "Getting diff from base branch..."
26+
git diff --name-only origin/${{ github.base_ref }}...HEAD > changed_files.txt
27+
cat changed_files.txt
28+
echo "files<<EOF" >> $GITHUB_OUTPUT
29+
cat changed_files.txt >> $GITHUB_OUTPUT
30+
echo "EOF" >> $GITHUB_OUTPUT
31+
32+
- name: Show file changes # TODO: test locally
33+
run: |
34+
echo "=== Changed Files ==="
35+
cat changed_files.txt
36+
echo ""
37+
echo "=== File Diffs ==="
38+
git diff origin/${{ github.base_ref }}...HEAD
39+
40+
- name: Run Claude Code to read changes
41+
uses: anthropics/claude-code-action@v1
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
45+
prompt: |
46+
You are reviewing a PR.
47+
48+
First, run 'git diff origin/${{ github.base_ref }}...HEAD' to see what changed.
49+
50+
Then read the changed files and log:
51+
1) List of all changed files
52+
2) Brief description of what changed in each file
53+
54+
This is just a verification - don't provide detailed review yet.
55+
claude_args: >-
56+
--max-turns 5
57+
--model claude-sonnet-4-5-20250929

0 commit comments

Comments
 (0)