Skip to content

Conversation

@MantisClone
Copy link
Member

@MantisClone MantisClone commented Dec 4, 2025

Problem

Deploy workflow fails because husky pre-commit hook runs validation, which rejects the real timestamp set during deployment.

Solution

Set HUSKY=0 before git commit commands in the deploy workflow to skip pre-commit hooks during CI.

Changes

  • .github/workflows/deploy.yml: Add HUSKY=0 to both commit commands
  • tokens/token-list.json: Bump version to 1.3.2
  • .gitignore: Add .ignore folder

Considerations

  • HUSKY=0 is the official way to disable husky in CI environments
  • Validation still runs as a dedicated step before the timestamp update

Summary by CodeRabbit

  • Chores
    • Updated deployment workflow configuration to optimize CI/CD processes.
    • Enhanced configuration file management with additional ignore rules.
    • Updated token list version for maintenance purposes.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings December 4, 2025 22:09
@coderabbitai
Copy link

coderabbitai bot commented Dec 4, 2025

Walkthrough

The changes update the deployment workflow to disable Husky hooks during CI commits by adding the HUSKY=0 environment variable prefix, extend the .gitignore configuration with a new .ignore path, and increment the token list patch version from 1 to 2.

Changes

Cohort / File(s) Summary
CI/CD Workflow
\.github/workflows/deploy\.yml
Added HUSKY=0 prefix to commit commands in two places to skip Husky pre-commit hooks during automated CI runs when updating token-list.json and pushing version files.
Configuration
\.gitignore
Added .ignore as a new ignored path entry.
Data & Versioning
tokens/token-list\.json
Incremented version.patch from 1 to 2.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • All changes are straightforward: environment variable addition, configuration entry, and version bump with no complex logic or control flow modifications.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: skipping Husky hooks in CI and bumping the version to 1.3.2, matching the core modifications across deploy.yml and token-list.json.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/skip-husky-in-ci

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a 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=0 environment variable
  • Bumps patch version from 1.3.1 to 1.3.2
  • Adds .ignore folder 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.

Copy link

@coderabbitai coderabbitai bot left a 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 file

If 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 commit

HUSKY=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 here

Good 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5436e4f and 2350aae.

📒 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 good

Version increment to 1.3.2 aligns with the deploy flow.

@MantisClone MantisClone merged commit 753f12c into main Dec 4, 2025
12 checks passed
@MantisClone MantisClone deleted the fix/skip-husky-in-ci branch December 4, 2025 22:30
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.

2 participants