Skip to content

fix: add .husky/_ to .gitignore to fix release workflow#5832

Open
killagu wants to merge 1 commit intonextfrom
fix/gitignore-husky
Open

fix: add .husky/_ to .gitignore to fix release workflow#5832
killagu wants to merge 1 commit intonextfrom
fix/gitignore-husky

Conversation

@killagu
Copy link
Contributor

@killagu killagu commented Mar 16, 2026

Summary

  • Add .husky/_ to .gitignore to prevent release workflow failures
  • pnpm install runs husky via the prepare hook, generating .husky/_/ directory with git hook scripts
  • This untracked directory makes git status --porcelain report dirty state, causing scripts/version.js clean check to fail
  • Fixes: https://github.com/eggjs/egg/actions/runs/23141355029/job/67219178270

Test plan

  • Verify .husky/_ is now ignored by git
  • Re-run Manual Release workflow to confirm version bump succeeds

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated development tooling configuration.

The `pnpm install` prepare hook runs `husky`, which generates
`.husky/_/` directory. This directory is untracked and makes
git working directory dirty, causing `scripts/version.js` clean
check to fail during the Manual Release workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 16, 2026 11:45
Copy link
Contributor

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.

Copilot wasn't able to review any files in this pull request.


You can also share your feedback on Copilot code review. Take the survey.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a critical issue in the release workflow by ensuring that the .husky/_ directory, which is automatically generated during pnpm install via the prepare hook, is properly ignored by Git. This change prevents the release process from failing due to an unexpected dirty working tree, thereby enabling successful version bumps and releases.

Highlights

  • Release Workflow Fix: Added .husky/_ to .gitignore to prevent release workflow failures caused by the prepare hook generating an untracked directory, which led to git status --porcelain reporting a dirty state and failing the clean check.
Changelog
  • .gitignore
    • Added .husky/_ to the ignore list to prevent it from being tracked by Git.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d75f1551-b1f1-4231-958b-bf4bd6bdc645

📥 Commits

Reviewing files that changed from the base of the PR and between 3ec8105 and d132834.

📒 Files selected for processing (1)
  • .gitignore

📝 Walkthrough

Walkthrough

A single line was added to .gitignore to exclude the .husky/_ directory from version control, preventing Husky-related internal files from being tracked.

Changes

Cohort / File(s) Summary
Git Ignore Configuration
.gitignore
Added ignore rule for .husky/_ directory to exclude Husky internal files from version control.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~1 minute

Poem

🐰 A little underscore hides away,
In .husky/_ it shall stay,
Git ignore whispers its soft refrain,
Keep the repo clean and sane! 🌿

🚥 Pre-merge checks | ✅ 3
✅ 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 clearly and specifically describes the main change: adding .husky/_ to .gitignore to resolve a release workflow issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/gitignore-husky
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

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

@cloudflare-workers-and-pages
Copy link

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: d132834
Status: ✅  Deploy successful!
Preview URL: https://c3351684.egg-cci.pages.dev
Branch Preview URL: https://fix-gitignore-husky.egg-cci.pages.dev

View logs

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.62%. Comparing base (3ec8105) to head (d132834).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #5832   +/-   ##
=======================================
  Coverage   85.62%   85.62%           
=======================================
  Files         665      665           
  Lines       13004    13004           
  Branches     1495     1495           
=======================================
  Hits        11135    11135           
  Misses       1745     1745           
  Partials      124      124           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cloudflare-workers-and-pages
Copy link

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: d132834
Status: ✅  Deploy successful!
Preview URL: https://a9a72e18.egg-v3.pages.dev
Branch Preview URL: https://fix-gitignore-husky.egg-v3.pages.dev

View logs

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly adds the .husky/_ directory to the .gitignore file, which will resolve the release workflow failures caused by untracked generated files. I have one suggestion to add a comment and a blank line for this new entry to improve the file's long-term maintainability.

.DS_Store
.tmp
.egg
.husky/_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved maintainability, it's good practice to add a comment explaining why this entry is being ignored, especially for tool-specific generated files like Husky's. This will help other developers understand its purpose and prevent accidental removal in the future. Adding a blank line also helps to group it logically.


# husky
.husky/_

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