Skip to content

Add GitHub workflow timeout pre-commit hook#695

Merged
sirosen merged 1 commit into
python-jsonschema:mainfrom
w3lld1:feat/github-workflow-timeout-hook
Jul 13, 2026
Merged

Add GitHub workflow timeout pre-commit hook#695
sirosen merged 1 commit into
python-jsonschema:mainfrom
w3lld1:feat/github-workflow-timeout-hook

Conversation

@w3lld1

@w3lld1 w3lld1 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a dedicated check-github-workflows-require-timeout pre-commit hook backed by the existing custom timeout schema
  • teach hook generation to emit both vendored and custom-schema hooks with the correct builtin namespace
  • generate the hook documentation and add an unreleased changelog entry
  • cover the generated hook ID, custom-schema entry, file pattern, and YAML type

Fixes #639

Validation

  • uvx pre-commit run --all-files
  • tox run -e generate-hooks-config
  • tox run -e mypy
  • tox run -e docs
  • tox run -e py311 -- -k 'not memfd' -q — 609 passed, 13 skipped, 3 deselected
  • direct positive/negative fixture checks with --builtin-schema custom.github-workflows-require-timeout
  • git diff --check

I 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 with AttributeError. Those tests are unrelated to this hook change and are included in the upstream CI matrix on standard GitHub runners.

@sirosen

sirosen commented Jul 13, 2026

Copy link
Copy Markdown
Member

Thanks for sending this, it looks good to go!

@sirosen
sirosen merged commit de21be9 into python-jsonschema:main Jul 13, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

github-workflows-require-timeout git hook

2 participants