-
Notifications
You must be signed in to change notification settings - Fork 4
fix: Skip husky hooks during CI commits and bump to 1.3.2 #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes update the deployment workflow to disable Husky hooks during CI commits by adding the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a deployment workflow failure where husky pre-commit hooks were blocking commits during CI execution. The pre-commit hook runs validation that enforces a timestamp placeholder in the source file, but the deploy workflow needs to commit a real timestamp. The fix uses HUSKY=0 to disable hooks during CI commits while preserving validation as a separate step.
Key Changes:
- Disables husky hooks for git commits in the deploy workflow using
HUSKY=0environment variable - Bumps patch version from 1.3.1 to 1.3.2
- Adds
.ignorefolder to.gitignore
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/deploy.yml |
Adds HUSKY=0 prefix to both git commit commands and updates related comments to skip pre-commit hooks in CI |
tokens/token-list.json |
Increments patch version from 1 to 2 (1.3.1 → 1.3.2) |
.gitignore |
Adds .ignore folder to ignored files list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.gitignore (1)
3-3: Clarify intent: ignore folder vs fileIf you intend a directory, prefer a trailing slash: .ignore/ to avoid also ignoring a top-level file named ".ignore".
-.ignore +.ignore/.github/workflows/deploy.yml (2)
37-44: Correct: disable Husky during CI commitHUSKY=0 before git commit is the right way to skip hooks in CI. Consider moving HUSKY: 0 to job/step env and configuring Git user once to reduce duplication.
jobs: deploy: runs-on: ubuntu-latest + env: + HUSKY: 0 @@ - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" @@ - HUSKY=0 git commit -m "chore: Update timestamp for release [skip ci]" + git commit -m "chore: Update timestamp for release [skip ci]"
57-63: Same hereGood to skip hooks. The same env-level HUSKY: 0/DRY git config suggestion applies.
- HUSKY=0 git commit -m "chore: Preserve v${CURRENT_VERSION}.json as historical snapshot [skip ci]" + git commit -m "chore: Preserve v${CURRENT_VERSION}.json as historical snapshot [skip ci]"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/deploy.yml(2 hunks).gitignore(1 hunks)tokens/token-list.json(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: MantisClone
Repo: RequestNetwork/request-token-list PR: 12
File: .husky/_/pre-commit:0-0
Timestamp: 2025-11-04T02:01:20.596Z
Learning: In Husky, the `.husky/_/` directory contains internal implementation details (like the auto-generated `h` helper file) and is typically gitignored. User-facing git hooks should be placed directly in `.husky/` (e.g., `.husky/pre-commit`), not in `.husky/_/`. Files in `.husky/_/` are auto-generated by Husky during `npm install`.
📚 Learning: 2025-11-04T02:01:20.596Z
Learnt from: MantisClone
Repo: RequestNetwork/request-token-list PR: 12
File: .husky/_/pre-commit:0-0
Timestamp: 2025-11-04T02:01:20.596Z
Learning: In Husky, the `.husky/_/` directory contains internal implementation details (like the auto-generated `h` helper file) and is typically gitignored. User-facing git hooks should be placed directly in `.husky/` (e.g., `.husky/pre-commit`), not in `.husky/_/`. Files in `.husky/_/` are auto-generated by Husky during `npm install`.
Applied to files:
.gitignore.github/workflows/deploy.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Agent
🔇 Additional comments (1)
tokens/token-list.json (1)
7-7: Patch bump looks goodVersion increment to 1.3.2 aligns with the deploy flow.
Problem
Deploy workflow fails because husky pre-commit hook runs validation, which rejects the real timestamp set during deployment.
Solution
Set
HUSKY=0before git commit commands in the deploy workflow to skip pre-commit hooks during CI.Changes
.github/workflows/deploy.yml: AddHUSKY=0to both commit commandstokens/token-list.json: Bump version to 1.3.2.gitignore: Add.ignorefolderConsiderations
HUSKY=0is the official way to disable husky in CI environmentsSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.