Fix pre-push hook to fail if working tree dirty #5194
+22
−24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation
Now that we've instructed the lint pipeline to update the ESLint warning thresholds file, if you introduce changes to lint violations prior to pushing, and you have the
pre-push
Git hook installed, you could forget to push changes to this file.This commit extracts the "working tree dirty" check that we perform in the
lint-build-test
GitHub workflow to a script so that we can not only call it in the workflow but also after runningyarn lint
in thepre-push
hook.Note that you'll need to re-run
yarn simple-git-hooks
for this change to take effect.References
Changelog
(N/A, developer-only change)
Checklist