core icon indicating copy to clipboard operation
core copied to clipboard

Fix pre-push hook to fail if working tree dirty

Open mcmire opened this issue 11 months ago • 2 comments

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 running yarn lint in the pre-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

  • [x] I've updated the test suite for new or updated code as appropriate
  • [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

mcmire avatar Jan 23 '25 23:01 mcmire

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

^ I think that comment may be a misfire.

mcmire avatar Jan 24 '25 16:01 mcmire