chore: add generate-client sync check to CI and lefthook#87
Conversation
- Add generate-client check to ci.yml and pull_request.yml - Add generate-client check to lefthook pre-commit - Update PR template with current CI checks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Warning Rate limit exceeded@11gather11 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 16 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughAdds CI and pre-commit checks that regenerate and verify the repository's generated client ( Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer (local)
participant Hook as Lefthook (pre-commit)
participant Repo as Git repo / Working tree
participant CI as CI Runner
participant Script as generate:client (bun)
participant Git as git diff
Dev->>Hook: commit
Hook->>Script: run `bun run generate:client`
Script->>Repo: update `src/client.ts`
Hook->>Git: `git diff --exit-code src/client.ts`
alt no changes
Git-->>Hook: exit 0 — commit allowed
else changes detected
Git-->>Hook: exit non-zero — commit rejected
end
Note over Dev,CI: On push / PR
Dev->>CI: push / open PR
CI->>CI: run Type Check
CI->>Script: run `bun run generate:client`
Script->>Repo: update `src/client.ts`
CI->>Git: `git diff --exit-code src/client.ts`
alt no changes
Git-->>CI: exit 0 — continue to tests
else changes detected
Git-->>CI: exit non-zero — job fails
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/pull_request.yml (1)
24-24: Critical: Bun version mismatch between workflows.This workflow uses Bun version
1.3.4, while.github/workflows/ci.ymluses version1.3.5. This inconsistency could cause different client generation output between PR checks and main branch CI, potentially leading to false positives or false negatives in the generate-client sync validation.🔎 Proposed fix to align Bun versions
- name: Setup Bun uses: oven-sh/setup-bun@v2 with: - bun-version: 1.3.4 + bun-version: 1.3.5
♻️ Duplicate comments (1)
.github/workflows/pull_request.yml (1)
35-38: Same scope concern as in ci.yml.As noted in the ci.yml review, this check only validates
src/client.ts. If the generation script produces multiple files, others won't be caught.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/PULL_REQUEST_TEMPLATE.md.github/workflows/ci.yml.github/workflows/pull_request.ymllefthook.json
🔇 Additional comments (2)
.github/PULL_REQUEST_TEMPLATE.md (1)
31-36: Excellent documentation of the test plan.The expanded checklist clearly documents all CI validation steps, including the new generate-client check. This helps contributors understand what checks they need to pass before submitting a PR.
lefthook.json (1)
11-15: The glob pattern does not restrict when this hook runs.The hook executes on every commit regardless of changed files because the
runcommand doesn't use{staged_files}or other file templates. Remove theglobfilter since it has no effect here, or add{staged_files}to the run command if you want to make glob filtering functional.Likely an incorrect or invalid review comment.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
src/client.tsがルートファイルと同期されているかをCI/lefthookでチェックするようにしました。Changes
ci.yml,pull_request.yml) にgenerate-clientチェックを追加generate-clientチェックを追加Test Plan
bun run checkbun run typecheckbun run generate:clientbun testbun changeset(if this PR includes user-facing changes)🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.