Skip to content

Migrate git hooks from Husky to Prek and refresh gitattributes#68

Merged
maehr merged 6 commits intomainfrom
copilot/implement-issue-67-suggestion
Feb 2, 2026
Merged

Migrate git hooks from Husky to Prek and refresh gitattributes#68
maehr merged 6 commits intomainfrom
copilot/implement-issue-67-suggestion

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

Pull request

Proposed changes

Migrate Git hook management from Husky to Prek, update contributor docs, refresh .gitattributes using upstream snippet heads, and adjust link-checker exclusions for external timeouts.

  • Hook configuration: added a Prek-compatible .pre-commit-config.yaml and wired npm run prepare to install hooks.
  • Dependencies: removed Husky and added @j178/prek as the hook runner.
  • Documentation: updated README/CONTRIBUTING/AGENTS to describe Prek setup and removed legacy Husky migration guidance.
  • Repository hygiene: refreshed .gitattributes from upstream snippets and updated .lycheerc.toml exclusions for timeout-prone links.

Example configuration:

repos:
  - repo: local
    hooks:
      - id: prettier-check
        name: Prettier check
        entry: npm run check
        language: system
        stages: [pre-commit]

Types of changes

  • New feature (non-breaking change which adds functionality).
  • Enhancement (non-breaking change which enhances functionality)
  • Bug Fix (non-breaking change which fixes an issue).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist

  • I have read the README document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
Original prompt

implement #67


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 2, 2026 10:17
Co-authored-by: maehr <14755525+maehr@users.noreply.github.com>
Co-authored-by: maehr <14755525+maehr@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement suggestion from issue #67 in open research data template Migrate git hooks from Husky to Prek Feb 2, 2026
Copilot AI requested a review from maehr February 2, 2026 10:22
@maehr maehr marked this pull request as ready for review February 2, 2026 10:43
Copilot AI review requested due to automatic review settings February 2, 2026 10:43
@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

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 migrates Git hook management from Husky to Prek, updating the hook runner while preserving existing pre-commit behavior that runs Prettier checks.

Changes:

  • Replaced Husky with Prek (@j178/prek v0.3.1) as the Git hook management tool
  • Added .pre-commit-config.yaml with pre-commit-compatible configuration
  • Updated documentation (README, CONTRIBUTING, AGENTS) to reflect the new Prek workflow

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Removed husky dependency, added @j178/prek, updated prepare script to run prek install
package-lock.json Removed husky and unrelated deprecated lychee npm package, added @j178/prek with its dependencies
README.md Updated references from Husky to Prek with installation and usage instructions
CONTRIBUTING.md Added Prek hook installation steps and Husky-to-Prek migration guidance
AGENTS.md Updated command reference table from Husky to Prek
.pre-commit-config.yaml Added new Prek configuration file that runs prettier check on pre-commit
.husky/pre-commit Removed old Husky hook file
.gitattributes Removed .husky directory line ending configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: maehr <14755525+maehr@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 2, 2026

@copilot update .gitattributes with
"""
{ curl https://raw.githubusercontent.com/alexkaratarakis/gitattributes/master/Common.gitattributes | head -20 && curl https://raw.githubusercontent.com/alexka...

Updated .gitattributes using the exact upstream snippet command and refreshed the link checker excludes for the reported timeouts. Commit: ba398b2. Screenshot: /tmp/gitattributes-update.svg

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • gnu.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • www.gnu.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • www.makeareadme.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Migrate git hooks from Husky to Prek Migrate git hooks from Husky to Prek and refresh gitattributes Feb 2, 2026
@maehr
Copy link
Owner

maehr commented Feb 2, 2026

@copilot remove husky also from docs. assume people do not update their template

Co-authored-by: maehr <14755525+maehr@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 2, 2026

@copilot remove husky also from docs. assume people do not update their template

Removed Husky migration guidance from CONTRIBUTING.md so the docs only reference Prek. Commit: 0ab5e16. Screenshot: /tmp/contributing-update.svg

@maehr maehr merged commit ba14434 into main Feb 2, 2026
7 checks passed
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