-
Notifications
You must be signed in to change notification settings - Fork 26
chore(hook): simplify pre-commit hook #651
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
Conversation
✅ Deploy Preview for api-clients-automation canceled.
|
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
c7fe19d
to
5f56782
Compare
5f56782
to
078ea29
Compare
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.
Noice
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.
Nice :D
module.exports = { | ||
patterns: [ | ||
// Ignore the roots and go down the tree by negating hand written files | ||
'specs/bundled/*.yml', |
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.
Let's closely look at the next PRs pushed code so we can make sure we did not broke anything here
@@ -1,24 +1,63 @@ | |||
/* eslint-disable @typescript-eslint/no-var-requires */ |
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.
It seems good for now! We can add more tests later :D
🧭 What and Why
I wanted to add a mix of
positive
,negative
,positive
glob to the file to unstage, but it was not possible because we splitpositive
andnegative
glob before matching.Micromatch is already able to handle a list of pattern, we don't need extra logic, I didn't saw any edge cases while testing.
Changes included:
🧪 Test
Try to add files to stage and unstage and run the command
node scripts/ci/husky/pre-commit.js