Skip to content

Commit 194f9b4

Browse files
aboucaudEiffL
andauthored
Add workflow to check docs after PR is merged (#114)
This will create if need be an issue with the list of docs to be updated. Co-authored-by: Francois Lanusse <EiffL@users.noreply.github.com>
1 parent d08e814 commit 194f9b4

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/check-docs.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Documentation Health Check
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
check-docs:
9+
# Only run when the PR was actually merged (not just closed)
10+
if: github.event.pull_request.merged == true
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
issues: write # To open an issue if docs are stale
15+
pull-requests: write # To post a comment on the merged PR
16+
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0 # Full history needed to diff against base SHA
22+
23+
- name: Check documentation with Claude
24+
uses: anthropics/claude-code-action@v1
25+
with:
26+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
27+
prompt: |
28+
A pull request has just been merged into this repository.
29+
30+
PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}
31+
Description: ${{ github.event.pull_request.body }}
32+
33+
Your task: check whether the project documentation is still accurate
34+
and complete given the code changes introduced by this PR.
35+
36+
Steps to follow:
37+
1. Run: git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }}
38+
to get the list of changed files.
39+
2. Read the changed source files (focus on .py, .ts, .js, .go, .rs files).
40+
3. Read existing documentation files (README*, docs/**/*.md, CHANGELOG*, CONTRIBUTING*).
41+
4. SKIP any files under skills/ or named SKILL.md — these are not user-facing docs.
42+
5. Identify any documentation that is now inaccurate, incomplete, or missing
43+
given the code changes.
44+
45+
Then:
46+
- Post a comment on PR #${{ github.event.pull_request.number }} summarising
47+
your findings (✅ if docs look fine, ⚠️ if issues found).
48+
- If you find real documentation issues, open a GitHub Issue titled
49+
"📚 Docs may be stale after PR #${{ github.event.pull_request.number }}"
50+
with label "documentation", listing the specific files and what needs updating.
51+
- Do NOT open an issue if documentation looks fine.
52+
- Do NOT modify any files — read-only analysis only.

0 commit comments

Comments
 (0)