Skip to content

feat: add official pre-commit hook support#2741

Open
juftin wants to merge 3 commits intogo-task:mainfrom
juftin:feat/pre-commit-hooks
Open

feat: add official pre-commit hook support#2741
juftin wants to merge 3 commits intogo-task:mainfrom
juftin:feat/pre-commit-hooks

Conversation

@juftin
Copy link

@juftin juftin commented Mar 13, 2026

Summary

Closes #2562.

Adds official pre-commit support by adding a .pre-commit-hooks.yaml at the repository root. This allows users to reference repo: https://github.com/go-task/task directly in their .pre-commit-config.yaml rather than maintaining a local hook definition.

Changes

  • .pre-commit-hooks.yaml: defines a single task hook with language: golang, pass_filenames: false, require_serial: true, and minimum_pre_commit_version: "3.0.0" (required for golang language support)
  • precommit_test.go: validates the hook file is present, parses as valid YAML, and asserts all fields are correctly set
  • website/src/docs/integrations.md: documents the integration with setup instructions, a configuration reference table, and collapsible examples covering common use cases
  • website/src/docs/changelog.md: adds a changelog entry

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.

1 participant