Skip to content
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

fix husky pre-commit hook #314

Merged
merged 2 commits into from
Dec 17, 2024
Merged

fix husky pre-commit hook #314

merged 2 commits into from
Dec 17, 2024

Conversation

twrichards
Copy link
Collaborator

run fnm use and nvm use to ensure correct version of node before executing the various steps in the pre-commit hook (configured via husky)

Broken since #307

@twrichards twrichards marked this pull request as ready for review October 28, 2024 09:02
@twrichards twrichards requested a review from a team as a code owner October 28, 2024 09:02
@twrichards twrichards enabled auto-merge October 28, 2024 09:08
@twrichards twrichards force-pushed the fix_husky_pre-commit_hook branch from 1ec8fe9 to b081524 Compare October 28, 2024 09:08
@twrichards twrichards force-pushed the fix_husky_pre-commit_hook branch from b081524 to 7b16d1e Compare October 28, 2024 09:24
@bryophyta
Copy link

the code looks good to me but I haven't been able to trigger the hook itself...

./scripts/setup.sh
touch temp_file
git add temp_file
git commit -m "Test commit"
git push

Am I missing a step to get the hooks set up?

@twrichards
Copy link
Collaborator Author

the code looks good to me but I haven't been able to trigger the hook itself...

./scripts/setup.sh
touch temp_file
git add temp_file
git commit -m "Test commit"
git push

Am I missing a step to get the hooks set up?

its a pre-commit hook, so shouldn't need the git push (basically the commit should be slow), not sure why it's not running for you though, will message you offline...

…executing the various steps in the `pre-commit` hook (configured via husky)
@twrichards twrichards force-pushed the fix_husky_pre-commit_hook branch from 7b16d1e to ed944f6 Compare December 17, 2024 09:44
@twrichards
Copy link
Collaborator Author

@bryophyta I can't seem to think why the hook wasn't running for you. I've just updated the setup.sh script which might help a little

If that doesn't work, perhaps you might try https://typicode.github.io/husky/troubleshoot.html

Copy link
Member

@andrew-nowak andrew-nowak left a comment

Choose a reason for hiding this comment

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

lgtm

@twrichards twrichards merged commit 222febf into main Dec 17, 2024
3 checks passed
@twrichards twrichards deleted the fix_husky_pre-commit_hook branch December 17, 2024 11:07
@prout-bot
Copy link
Collaborator

Seen on PROD (merged by @twrichards 3 minutes and 14 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants