Skip to content

Commit ea9253e

Browse files
committed
ci: add Claude Code Review workflow for docs PRs
The DOS.AI code repo auto-reviews every PR via claude-code-review, but this docs repo had no PR reviewer - docs PRs (e.g. the partner-API update #1) shipped unreviewed. Mirrors that workflow, retuned for a documentation repo: - Reviews for factual accuracy (base URLs, endpoint paths, auth schemes, code samples vs the real product), broken links, cross-page consistency, house style (ASCII hyphens only - flag em/en-dashes), and completeness. - Same org secret CLAUDE_CODE_OAUTH_TOKEN, same anthropics/claude-code-action@v1, same read-only permissions + gh-comment allowed-tools. Runs on pull_request opened/synchronize. No build step (Markdown repo).
1 parent e7e2916 commit ea9253e

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Claude Code Review
2+
3+
# Auto-reviews every docs PR for accuracy, broken links, consistency, and
4+
# house style. Mirrors the reviewer in the DOS.AI code repo, retuned for a
5+
# documentation repo (no build/tests to reason about). Uses the org secret
6+
# CLAUDE_CODE_OAUTH_TOKEN.
7+
8+
on:
9+
pull_request:
10+
types: [opened, synchronize]
11+
12+
jobs:
13+
claude-review:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: read
18+
issues: read
19+
id-token: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v6
24+
with:
25+
fetch-depth: 1
26+
27+
- name: Run Claude Code Review
28+
id: claude-review
29+
uses: anthropics/claude-code-action@v1
30+
with:
31+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
32+
prompt: |
33+
REPO: ${{ github.repository }}
34+
PR NUMBER: ${{ github.event.pull_request.number }}
35+
36+
This is a documentation repository (GitBook Markdown for the
37+
DOS.AI developer docs). Review this pull request for:
38+
39+
- Factual accuracy: do API base URLs, endpoint paths, auth
40+
schemes, request/response shapes, and code samples match the
41+
actual product? Flag anything that looks stale or invented.
42+
- Broken or wrong links: internal page links and external URLs.
43+
- Consistency: terminology, endpoint naming, and auth examples
44+
should agree across pages (e.g. an endpoint documented one way
45+
on the overview must match the reference page).
46+
- House style: user-facing text uses ASCII hyphens only - flag
47+
any em-dash (—) or en-dash (–).
48+
- Completeness: new endpoints/parameters documented; deprecated
49+
ones marked.
50+
51+
Use the repository's README / SUMMARY.md for structure and any
52+
CLAUDE.md for conventions. Be constructive and specific (cite the
53+
file + line). Do NOT rewrite the docs; just review.
54+
55+
Use `gh pr comment` with your Bash tool to leave your review as a
56+
comment on the PR.
57+
58+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

0 commit comments

Comments
 (0)