Skip to content

Commit 3c9eba1

Browse files
ci: add Claude code review and auto-docs workflows
1 parent 72c0ee1 commit 3c9eba1

6 files changed

Lines changed: 85 additions & 13 deletions

File tree

.github/prompts/code-review.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
REPO: $REPO
2+
PR: $PR_NUMBER
3+
4+
Review PR #$PR_NUMBER in $REPO. This is a .NET NuGet library for JSON:API query parsing and mapping.
5+
6+
Read all CLAUDE.md files in the repo first. They document conventions and non-obvious behaviors.
7+
8+
Pay attention to breaking changes, API surface correctness, and query parsing edge cases.
9+
10+
Post exactly one `gh pr comment`. Be brief. Only flag real problems — skip anything minor or stylistic.
11+
12+
Format:
13+
14+
```
15+
One sentence: what this PR does.
16+
17+
- `file:line` - issue (only include if genuinely problematic)
18+
```
19+
20+
No sections, no headers, no praise, no "looks good". If there are no issues, just write the one-sentence summary.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
You are updating documentation for $SOURCE_REPO, PR #$SOURCE_PR_ID.
2+
3+
The repo is checked out at `./docs-repo/`. Documentation articles are in `./docs-repo/docs/docs/`. Table of contents is in `./docs-repo/docs/toc.yml`.
4+
5+
Skip entirely if the PR is a refactor, CI change, dependency update, or bug fix with no behavior change.
6+
7+
Only document genuinely new or changed user-facing behavior. Write as little as possible — a sentence or two is better than a paragraph. No intro sections, no summaries, no restating what is obvious. Match the style of existing docs.
8+
9+
Write in GitHub Flavored Markdown. No em dashes.
10+
11+
Only write to `./docs-repo/docs/docs/` and `./docs-repo/docs/toc.yml`. Nothing else.

.github/release-please-config.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
"package-name": "Intility.JsonApiToolkit",
77
"include-component-in-tag": false,
88
"changelog-sections": [
9-
{ "type": "feat", "section": "Features", "hidden": false },
10-
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
11-
{ "type": "perf", "section": "Performance", "hidden": false },
12-
{ "type": "refactor", "section": "Refactoring", "hidden": false },
13-
{ "type": "docs", "section": "Documentation", "hidden": false },
14-
{ "type": "test", "section": "Tests", "hidden": true },
15-
{ "type": "chore", "section": "Maintenance", "hidden": true },
16-
{ "type": "deps", "section": "Dependencies", "hidden": false }
9+
{ "type": "feat", "section": "Features" },
10+
{ "type": "fix", "section": "Bug Fixes" },
11+
{ "type": "perf", "section": "Performance Improvements" },
12+
{ "type": "refactor", "section": "Code Refactoring" },
13+
{ "type": "docs", "section": "Documentation" },
14+
{ "type": "build", "section": "Build System" },
15+
{ "type": "ci", "section": "CI" },
16+
{ "type": "style", "section": "Styles" },
17+
{ "type": "test", "section": "Tests" },
18+
{ "type": "chore", "section": "Miscellaneous", "hidden": true }
1719
],
1820
"extra-files": [
1921
{

.github/workflows/claude-docs.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Claude: Auto Docs"
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches: [main]
7+
paths:
8+
- "JsonApiToolkit/**"
9+
10+
jobs:
11+
generate-docs:
12+
if: github.event.pull_request.merged == true
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
id-token: write
17+
uses: intility/reusable-claude/.github/workflows/claude-auto-docs.yml@58c3c5cad89379ba2154fd9e2e17cbba5a7f093d # v1.1.1
18+
with:
19+
source_repo: ${{ github.repository }}
20+
source_pr_id: ${{ github.event.pull_request.number }}
21+
docs_repo: ${{ github.repository }}
22+
system_prompt_path: ".github/prompts/docs-system-prompt.md"
23+
docs_pr_title_prefix: "docs:"
24+
secrets: inherit
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Claude: Code Review"
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
9+
jobs:
10+
claude-review:
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
issues: read
15+
id-token: write
16+
actions: read
17+
uses: intility/reusable-claude/.github/workflows/claude-code-review.yaml@58c3c5cad89379ba2154fd9e2e17cbba5a7f093d # v1.1.1
18+
with:
19+
prompt_file: ".github/prompts/code-review.md"
20+
secrets: inherit

.github/workflows/codeql.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: CodeQL
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- "**.cs"
8-
- "**.csproj"
94
schedule:
105
- cron: "0 6 * * 1" # Monday 6am UTC
116

0 commit comments

Comments
 (0)