Repository navigation
chore: add CodeRabbit + Claude GitHub App automation for issues and PRs - #214
Conversation
- Add .github/workflows/claude.yml: @claude assistant for issues/PRs, gated by author_association (OWNER/MEMBER/COLLABORATOR) to protect usage - Add .coderabbit.yaml: auto PR reviews with per-package path instructions - Add curated CLAUDE.md: project map, commands, and non-negotiables read by both Claude and CodeRabbit Sets up Bun-style AI review + assistant on issues and pull requests. All action refs are commit-SHA-pinned to match the repo's security posture. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019nyiYvdzow65mRj1kHkwRj
- Replace the earlier branch-local root CLAUDE.md with the canonical version already released on main (#204), so this branch does not diverge from the coordinated CLAUDE.md set. The CodeRabbit/@claude note is added in a follow-up commit once the branch is current with main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019nyiYvdzow65mRj1kHkwRj
Preview DeploymentPreview URL: https://9bcb993d.bestax.pages.dev |
- Add one line to the root CLAUDE.md stating that CodeRabbit (PR reviews) and the @claude GitHub Action (project instructions) both read this file, so it should be kept accurate.
…aude-setup-uq8p9c # Conflicts: # CLAUDE.md
Preview DeploymentPreview URL: https://cbd51fce.bestax.pages.dev |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a CodeRabbit configuration, a GitHub Actions workflow for ChangesAutomation tooling setup
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: ci, documentation, configuration Suggested reviewers: None specified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/claude.yml (1)
51-61: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winToolchain is pre-provisioned but dependencies aren't installed.
The comment states this step exists "so
@claudecan run tests/lint/build without burning turns bootstrapping the environment," but there's nopnpm installstep. Claude will still need to spend a turn runningpnpm install --frozen-lockfilebefore it can run tests/lint/build, partially defeating the stated purpose.Suggested fix: add an install step
- name: Setup Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: '24' cache: 'pnpm' + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Run Claude🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/claude.yml around lines 51 - 61, The workflow pre-provisions pnpm and Node.js in claude.yml, but it never installs project dependencies, so `@claude` still has to bootstrap before tests/lint/build can run. Add an explicit dependency installation step after Setup Node.js (using pnpm install with frozen lockfile) so the environment is fully ready before later job steps. Use the existing Setup pnpm and Setup Node.js steps as the anchor points for where to insert it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/claude.yml:
- Around line 51-61: The workflow pre-provisions pnpm and Node.js in claude.yml,
but it never installs project dependencies, so `@claude` still has to bootstrap
before tests/lint/build can run. Add an explicit dependency installation step
after Setup Node.js (using pnpm install with frozen lockfile) so the environment
is fully ready before later job steps. Use the existing Setup pnpm and Setup
Node.js steps as the anchor points for where to insert it.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ec54af50-6b2a-4c6d-9552-5dd5acf364a6
📒 Files selected for processing (3)
.coderabbit.yaml.github/workflows/claude.ymlCLAUDE.md
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai full review Generated by Claude Code |
|
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.coderabbit.yaml:
- Around line 23-29: The bulma-ui review guidance is weaker than the repo’s
actual coverage gate, so update the instruction text in the config entry to
match the documented 99% requirement rather than 95%. Adjust the bulma-ui block
in .coderabbit.yaml so reviewers flag any change that would drop overall
coverage below 99% for all metrics, keeping the existing TypeScript,
accessibility, Storybook, and Jest expectations intact.
- Around line 52-53: The `auto_review_labels` setting at the top level is being
ignored, so the `coderabbit` label gate never takes effect. Move this label
filter into the `reviews.auto_review.labels` section in `.coderabbit.yaml`, and
keep the existing `coderabbit` value there so the auto-review logic uses the
correct gate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 9fe62729-057c-4855-8cb1-df64cf98ac61
📒 Files selected for processing (3)
.coderabbit.yaml.github/workflows/claude.ymlCLAUDE.md
| auto_review_labels: | ||
| - 'coderabbit' |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the config file around the referenced lines and locate any schema/docs references.
echo "== .coderabbit.yaml (around lines 40-70) =="
nl -ba .coderabbit.yaml | sed -n '40,70p'
echo
echo "== Files mentioning auto_review_labels or reviews.auto_review.labels =="
rg -n --hidden --glob '!.git' 'auto_review_labels|reviews\.auto_review\.labels|auto_review:' .
echo
echo "== Candidate docs/config files =="
fd -a -H -I -t f 'coderabbit|yaml|yml|md' .Repository: allxsmith/bestax
Length of output: 238
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== .coderabbit.yaml excerpt =="
sed -n '1,120p' .coderabbit.yaml
echo
echo "== Repository references =="
rg -n --hidden --glob '!.git' 'auto_review_labels|reviews\.auto_review\.labels|auto_review:' .
echo
echo "== YAML keys near auto_review =="
python3 - <<'PY'
from pathlib import Path
p = Path('.coderabbit.yaml')
text = p.read_text()
for i, line in enumerate(text.splitlines(), 1):
if 'auto_review' in line or 'label' in line.lower():
print(f'{i}: {line}')
PYRepository: allxsmith/bestax
Length of output: 2569
🌐 Web query:
CodeRabbit configuration schema auto_review_labels reviews.auto_review.labels site:docs.coderabbit.ai OR site:coderabbit.ai
💡 Result:
In the CodeRabbit configuration schema, the reviews.auto_review.labels setting is used to control which pull requests are automatically reviewed based on their labels [1][2]. This setting allows for both positive inclusion and negative exclusion of pull requests [1][2]. Configuration Details: - The setting accepts an array of strings [1]. - Labels starting with a ! character act as negative filters (exclusions) [1][2]. - An empty array [] (the default) means all pull requests are reviewed, with no label filtering applied [1][2]. Examples of usage: - ["bug", "feature"]: Only reviews pull requests that have the bug or feature label [1][2]. - ["!wip"]: Reviews all pull requests except those labeled wip [1][2]. - ["bug", "!wip"]: Reviews pull requests that are labeled bug but do not have the wip label [1][2]. Important Behavior: The labels setting can also trigger an automatic review even when reviews.auto_review.enabled is set to false [1][2]. This enables users to implement a label-driven, opt-in workflow where automatic reviews are globally disabled, and only pull requests with specific, approved labels are reviewed [1]. You can view the currently resolved configuration for a pull request by using the @coderabbitai configuration command in a PR comment [3]. This command provides the configuration in YAML format, including annotations about where each setting originated (e.g., repository file, central configuration, or UI settings) [3].
Citations:
- 1: https://docs.coderabbit.ai/configuration/auto-review
- 2: https://docs.coderabbit.ai/reference/configuration
- 3: https://docs.coderabbit.ai/getting-started/yaml-configuration
Move the label filter under reviews.auto_review .coderabbit.yaml:52-53
auto_review_labels is ignored here; the label filter belongs at reviews.auto_review.labels, so this never applies the coderabbit gate.
Suggested fix
auto_review:
enabled: true
drafts: false
base_branches:
- main
+ labels:
+ - 'coderabbit'
...
- auto_review_labels:
- - 'coderabbit'🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.coderabbit.yaml around lines 52 - 53, The `auto_review_labels` setting at
the top level is being ignored, so the `coderabbit` label gate never takes
effect. Move this label filter into the `reviews.auto_review.labels` section in
`.coderabbit.yaml`, and keep the existing `coderabbit` value there so the
auto-review logic uses the correct gate.
…red label key - Update bulma-ui path_instructions to require >= 99% coverage (all metrics), matching the actual CI gate (CLAUDE.md), instead of 95%. - Remove the top-level auto_review_labels key, which CodeRabbit's schema ignores. Relocating it to reviews.auto_review.labels would gate auto-review to only PRs labeled 'coderabbit'; we want every PR reviewed, so drop it and keep the default (review all PRs). Addresses CodeRabbit review on PR #214.
|
Thanks @coderabbitai — both findings addressed in
Generated by Claude Code |
|
Tip For best results, initiate chat on the files or code changes.
Both findings look properly resolved in 🐇✨ ✏️ Learnings added
|
Preview DeploymentPreview URL: https://036523af.bestax.pages.dev |
|
🎉 This PR is included in version 5.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Pull Request
Description
Adds the AI-automation layer for issues and PRs — the "companion automation" that #204 scoped out and left pending. Two config files, sitting on top of the CLAUDE.md instruction layer that #204 already shipped:
.github/workflows/claude.yml— the@claudeassistant for issues/PRs (answer, implement fixes, open PRs). Gated byauthor_associationso onlyOWNER/MEMBER/COLLABORATORcan trigger it — this is the primary guard against strangers spending Claude usage on a public repo. Pre-provisions pnpm + Node 24 so@claudecan run the repo's checks. Auth viaCLAUDE_CODE_OAUTH_TOKEN(Claude Max subscription; swap toANTHROPIC_API_KEYif preferred)..coderabbit.yaml— automatic PR reviews with per-packagepath_instructions(bulma-ui coverage/a11y/story+test expectations, create-bestax e2e, docs MDX) and noise filters for lockfiles/snapshots/dist. CodeRabbit is free for public repos and billed on its own account — it does not consume Anthropic usage.All action refs are commit-SHA-pinned to the versions already used elsewhere in the repo (
checkout,pnpm/action-setup,setup-node) plusanthropics/claude-code-action.@allxsmith/bestax-bulma)create-bestax)@allxsmith/bestax-docs).coderabbit.yaml,.github/workflows/claude.yml, rootCLAUDE.md)Related Issue(s)
Refs #204 (this is the pending "CodeRabbit + Claude GitHub App rollout" companion it referenced)
Type of Change
Checklist
Additional Context
Manual steps the maintainer performs to activate (cannot be done in code):
allxsmith/bestaxand add repo secretCLAUDE_CODE_OAUTH_TOKEN(claude setup-token).author_associationgate).Usage-protection layers built in: (1) the
author_associationif:gate, (2) GitHub's outside-contributor approval, (3) per-run--max-turnscap, (4) account-level limits (Max subscription / API spend cap).Generated by Claude Code
Summary by CodeRabbit
New Features
Chores
Documentation