Skip to content

Commit c065128

Browse files
committed
Merge branch 'master' into next
# Conflicts: # CHANGELOG.md
2 parents e9ba3fc + 98a9a49 commit c065128

2 files changed

Lines changed: 82 additions & 0 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Claude PR review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
7+
# Cancel a superseded review when the branch is pushed again.
8+
concurrency:
9+
group: claude-review-${{ github.event.pull_request.number }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
review:
14+
runs-on: ubuntu-latest
15+
# Secrets, including CLAUDE_CODE_OAUTH_TOKEN, are unavailable to fork
16+
# pull requests.
17+
if: >-
18+
github.event.pull_request.draft == false &&
19+
github.event.pull_request.head.repo.full_name == github.repository
20+
permissions:
21+
contents: read
22+
pull-requests: write
23+
issues: write
24+
actions: read
25+
# claude-code-action exchanges an OIDC token for its GitHub App token.
26+
id-token: write
27+
steps:
28+
- uses: actions/checkout@v6
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Fetch the base branch
33+
run: |
34+
git fetch --no-tags origin \
35+
+refs/heads/${{ github.event.pull_request.base.ref }}:refs/heads/${{ github.event.pull_request.base.ref }} || true
36+
37+
- name: Set up Python
38+
uses: actions/setup-python@v6
39+
with:
40+
python-version: "3.12"
41+
42+
- name: Install poetry
43+
uses: snok/install-poetry@v1
44+
with:
45+
version: 1.5.1
46+
47+
- name: Install the project dependencies
48+
run: poetry install --no-interaction --no-root
49+
50+
- name: Install the docs dependencies
51+
run: pip install -r docs/requirements.txt
52+
53+
- name: Run the hier-config-review skill
54+
uses: anthropics/claude-code-action@v1
55+
with:
56+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
57+
track_progress: true
58+
prompt: |
59+
/hier-config-review
60+
61+
Review this pull request. The base branch is
62+
`${{ github.event.pull_request.base.ref }}`, so use
63+
`git diff ${{ github.event.pull_request.base.ref }}...HEAD` for the diff.
64+
65+
The Python environment is ready. Do not run `poetry install`.
66+
67+
Report only. Do not change, stage, or commit any file.
68+
69+
Post the full report as your pull request comment. Group the findings
70+
by severity (Blockers, Should fix, Nits). Give each finding a
71+
`file:line` reference and name the standard it violates. End with the
72+
pass/fail verdict against the "Before Opening a PR" checklist in
73+
AGENTS.md.
74+
claude_args: |
75+
--max-turns 60
76+
--allowedTools Read,Grep,Glob,Bash,mcp__github_comment__update_claude_comment

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ v4 design decisions, for the record:
4949
- `HConfig.future(..., prune_empty_branches=True)` removes sections that a
5050
change emptied out — matching devices that prune empty stanzas on commit —
5151
while keeping sections that were already empty (#269).
52+
- `.github/workflows/claude-review.yml`: a GitHub Actions workflow that runs
53+
the in-repo `hier-config-review` skill against every pull request through
54+
`anthropics/claude-code-action` and posts the findings as a PR comment. The
55+
job installs the poetry and docs environments first, so the skill's lint,
56+
test, and `mkdocs build --strict` gates run for real. It is skipped for draft
57+
and fork pull requests, where `CLAUDE_CODE_OAUTH_TOKEN` is unavailable.
5258
- Aruba AOS-CX platform support (`Platform.ARUBA_AOSCX`): a new driver and
5359
config view covering AOS-CX's Cisco/EOS-like hierarchical CLI. Because
5460
`vlan trunk allowed` is additive on AOS-CX rather than declarative, collapsed

0 commit comments

Comments
 (0)