Skip to content

fix: cora init installs pre-commit hook + v0.4.1 bump - #177

Merged
ajianaz merged 2 commits into
developfrom
fix/init-hook-install
Jun 6, 2026
Merged

ajianaz merged 2 commits into
developfrom
fix/init-hook-install

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Problem

cora init only creates .cora.yaml config — it does not install the pre-commit hook. Users had to manually run cora hook install as a separate step, which is easily forgotten.

Fix

  • cora init now automatically installs the pre-commit hook to .git/hooks/pre-commit
  • Added --no-hook flag to skip hook installation when needed
  • Graceful fallback: if not in a git repo, warns but does not fail init
  • Bump version to 0.4.1 with full CHANGELOG entry covering all fixes since v0.4.0

Changes

File Change
src/commands/init.rs Add skip_hook param, call hook::install_hook() with silent error handling
src/main.rs Add --no-hook flag to Init subcommand
CHANGELOG.md Full v0.4.1 entry (regex panic fix, CI resilience, auth login, hook install)
Cargo.toml Bump 0.4.0 → 0.4.1

Test

$ cora init --help
  --no-hook    Skip pre-commit hook installation

$ cora init
✅ Created .cora.yaml with example configuration.
✅ Installed pre-commit hook to .git/hooks/pre-commit

Fixes #176

- cora init auto-installs .git/hooks/pre-commit alongside .cora.yaml
- Add --no-hook flag to skip hook installation
- Graceful fallback when not in a git repo (warns, doesn't fail)
- Bump version to 0.4.1 + update CHANGELOG with all fixes since v0.4.0

Fixes #176
@github-actions

github-actions Bot commented Jun 6, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-cli · BYOK · MIT

@ajianaz
ajianaz merged commit 0c75e40 into develop Jun 6, 2026
11 checks passed
@ajianaz
ajianaz deleted the fix/init-hook-install branch June 6, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Poor UX setting up pre-commit hook: model/provider/base_url not picked up from .cora.yaml

1 participant