chore: lefthook で pre-push に CI 相当チェックを仕込む(#9)#71
Merged
Merged
Conversation
📝 WalkthroughWalkthroughCLAUDE.md に lefthook の pre-push フックの動作説明(typecheck/lint/test/build の並列実行、 Changesドキュメント更新
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
push 前に typecheck / lint / test / build をローカル実行し、失敗を CI より先に 検出する。lefthook で 4 チェックを並列実行(逐次より速く、どれが落ちたか一目)。 - lefthook.yml(新規): pre-push で typecheck/lint/test/build を parallel 実行 - package.json: lefthook を devDependencies に - pnpm-workspace.yaml: allowBuilds で lefthook の postinstall を許可 (`pnpm install` で pre-push hook が自動インストールされる) - CLAUDE.md: pre-push hook の説明を追記 - TODO.md: #9 を解決済み(#71)へ 補足: 元 issue の「dist 差分で fail」は #36 で dist 未コミット化され前提消滅。 本 PR は残る価値(CI 判定のローカル再現)を実装。lefthook run --all-files で 4 ジョブ green を確認済み。 Closes #9 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AECzAv2vcdATecuvLjBSa6
yk-lab
added a commit
that referenced
this pull request
Jul 7, 2026
## 概要 `TODO.md` は closed / open issue を手動でミラーしており、**GitHub Issues と二重管理**になっていた。編集のたびにマージ衝突を生み(直近 #71 のリベースでも衝突)、維持コストが価値を上回っていた。 ## 変更内容 - `TODO.md`(88 行 → 6 行): 状況は **GitHub Issues**、要件は `要求仕様書.md`、設計は `企画書.md` を真実の源とするポインタに置換 - 手動ミラーしていた「Done / backlog / 解決済み」テーブルを撤去(GitHub が追跡しているため冗長) ## 補足 - 他ファイルからの `TODO.md` 参照は無し(`grep` 確認済み) - この cleanup 自体は bookkeeping を減らす趣旨のため、あえて issue は起票していない 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Replaced the long `TODO.md` with a short pointer that moves task tracking to GitHub Issues, with requirements in `要求仕様書.md` and design decisions in `企画書.md`. This removes the manual issue mirror to prevent duplicate sources and merge conflicts. <sup>Written for commit 44884a2. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/yk-lab/setup-task/pull/74?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
push 前に typecheck / lint / test / build をローカル実行し、失敗を CI より先に(= CI minutes を使う前に)検出する(#9)。lefthook で 4 チェックを 並列実行(逐次より速く、どれが落ちたか一目)。
変更内容
lefthook.yml(新規):pre-pushで typecheck / lint / test / build をparallel: true実行package.json:lefthookを devDependencies にpnpm-workspace.yaml:allowBuildsで lefthook の postinstall を許可 →pnpm installで pre-push hook が自動インストール(postinstall が hook を sync)CLAUDE.md: pre-push hook の説明を追記TODO.md: [chore] lefthook で pre-push に npm run all を仕込む #9 を解決済みへ補足(元 issue の前提更新)
元 issue の動機「dist 再ビルド忘れ → CI の dist 鮮度チェックで気づく」は #36 で dist/ がリリース時ビルド・未コミット化され前提消滅(鮮度チェックは存在しない)。本 PR は残る価値「CI と同じ判定をローカル再現」を実装。
検証
pnpm exec lefthook run pre-push --all-filesで 4 ジョブ greenpnpm rebuild lefthookで hook 自動再作成を確認(fresh clone でもpnpm installで入る)参照
🤖 Generated with Claude Code
Summary by cubic
Add a
lefthookpre-push hook that runs typecheck, lint, test, and build in parallel so CI failures are caught locally before pushing. This mirrors our CI checks and speeds feedback.New Features
pnpm run typecheck,lint,test, andbuildin parallel.pnpm installviaallowBuildsinpnpm-workspace.yaml; runpnpm exec lefthook installif missing.CLAUDE.md; updatedTODO.mdto mark [chore] lefthook で pre-push に npm run all を仕込む #9 resolved.Dependencies
lefthookto devDependencies.Written for commit cf4f06a. Summary will update on new commits.