Add GitHub workflow timeout pre-commit hook - #695
Conversation
|
Thanks for sending this, it looks good to go! |
| rev: 0.37.4 | ||
| hooks: | ||
| - id: check-github-workflows-require-timeout |
There was a problem hiding this comment.
This hook is not included in 0.37.4 and trying to use as instructed here fails with
caused by: Hook `check-github-workflows-require-timeout` was not found in repository `https://github.com/python-jsonschema/check-jsonschema@0.37.4`. Check the hook ID or choose a `rev` that includes it
There was a problem hiding this comment.
use as instructed
Are you looking at https://check-jsonschema.readthedocs.io/en/latest/? The docs corresponding to 0.37.4 are actually https://check-jsonschema.readthedocs.io/en/stable.
So Stephen might want to update the default version on ReadTheDocs to be stable to avoid misguiding users that land on the default version page.
There was a problem hiding this comment.
First off:
- Good call, I should change the RTD config to make
stablethe default! - I'll do a release today. Usually I do one right away when a new hook gets added, but I clearly didn't this time.
A new hook probably shouldn't be added with the previous release number, but the doc generator doesn't have a good workaround for this. It's interesting to think about how to make this better. I'm a big fan of the version being static data in pyproject.toml, but maybe latest doc builds could "smudge" the version somehow... 🤔
Summary
check-github-workflows-require-timeoutpre-commit hook backed by the existing custom timeout schemaFixes #639
Validation
uvx pre-commit run --all-filestox run -e generate-hooks-configtox run -e mypytox run -e docstox run -e py311 -- -k 'not memfd' -q— 609 passed, 13 skipped, 3 deselected--builtin-schema custom.github-workflows-require-timeoutgit diff --checkI also ran the complete Python 3.11 suite. It reached 609 passed and 13 skipped, but this sandbox's Python build does not expose
os.memfd_create, so the three existing memfd-specific tests failed withAttributeError. Those tests are unrelated to this hook change and are included in the upstream CI matrix on standard GitHub runners.