-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: pre-commit hook #7428
base: main
Are you sure you want to change the base?
feat: pre-commit hook #7428
Conversation
npm run fix:tables | ||
npm run test:links | ||
npm run test:build | ||
git update-index --again |
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.
We might not need to run test:build
here in the pre-commit, since it generates a big chunk of text while committing, and we already run that in the CI
36e73ea
to
46c964c
Compare
Not sure if this is actually needed, doing a separate commit to ensure we can revert this easily.
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.
lgtm
No more headache when working with tables
Details
Uses: https://typicode.github.io/husky/ (https://github.com/typicode/husky)
Runs on:
git commit
Will be skipped on ci-runs
Runs:
fix:tables
,test:links
&test:build
(For Colin :D)
Notes
test:links
fails. It only outputs that there's an error. But this is intended since the CI should block that."prepare": "npx is-ci || npx husky"
is-ci
will be true if executed on github actions, skipping the husky run if neededgit update-index --again
is added to.husky/pre-commit
to commit the fixed tablestest:build