mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 20:07:18 +01:00
Python 3.14 stdlib package wiring git to the todo MCP server: - closer (post-commit): runs the done_check of each Todo: trailer task and close_task's it only on exit 0. It FAILS OPEN: the commit already happened, so a down server, bad token or no gh prints one warning and exits 0 instead of failing the hook. - sweep: nightly drift report (systemd units shipped, not enabled). - import-pr: a merged PR's '## Todo:' items become tasks, deduped. - A done_check runs only if its sha256 is in ~/.config/todo-hooks/trusted-checks; 'Check: manual' notes are never auto-closed. - Hooks exposed in .pre-commit-hooks.yaml (post-commit, post-merge, post-rewrite). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
883 B
YAML
28 lines
883 B
YAML
# Hooks other repos consume with `repo: https://github.com/kuhyx/utils`.
|
|
# All three are post-* stages, so each clone must install them (see
|
|
# todo_hooks/README.md). They never fail a git operation: the work has
|
|
# already happened, so server/gh trouble prints one warning and exits 0.
|
|
- id: todo-closer
|
|
name: close Todo trailer tasks
|
|
entry: scripts/todo_hooks.sh closer
|
|
language: script
|
|
stages: [post-commit]
|
|
always_run: true
|
|
pass_filenames: false
|
|
|
|
- id: todo-import-pr-merge
|
|
name: import PR Todo sections (pull)
|
|
entry: scripts/todo_hooks.sh import-pr post-merge
|
|
language: script
|
|
stages: [post-merge]
|
|
always_run: true
|
|
pass_filenames: false
|
|
|
|
- id: todo-import-pr-rewrite
|
|
name: import PR Todo sections (pull --rebase)
|
|
entry: scripts/todo_hooks.sh import-pr post-rewrite
|
|
language: script
|
|
stages: [post-rewrite]
|
|
always_run: true
|
|
pass_filenames: false
|