From b92d133c170e48eacd2de00e8d6a3e4298386495 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Mon, 2 Nov 2026 14:28:08 +0100 Subject: [PATCH] Add todo app git hooks Co-Authored-By: Claude Opus 5.5 (1M context) --- .pre-commit-config.yaml | 24 ++++++++++++++++++++++++ pubspec.yaml | 2 +- scripts/todo_hooks.sh | 12 ++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100755 scripts/todo_hooks.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 805af64..41eb85d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -73,6 +73,30 @@ repos: language: system files: \.(md|markdown)$ + - id: todo-closer + name: close Todo trailer tasks + entry: scripts/todo_hooks.sh closer + language: system + 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: system + 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: system + stages: [post-rewrite] + always_run: true + pass_filenames: false + # Every dependency on its ecosystem's newest STABLE release, exact-pinned # so the question is mechanically answerable at all. # diff --git a/pubspec.yaml b/pubspec.yaml index 33f71f0..3ad61c4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.58+1 +version: 1.0.59+1 environment: sdk: ^3.12.2 diff --git a/scripts/todo_hooks.sh b/scripts/todo_hooks.sh new file mode 100755 index 0000000..168dc7b --- /dev/null +++ b/scripts/todo_hooks.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Shim: forward to the shared todo git hooks in ~/src/utils (silent if absent). +set -euo pipefail + +readonly SHARED="${UTILS_ROOT:-$HOME/src/utils}/scripts/todo_hooks.sh" + +main() { + [[ -f "$SHARED" ]] || exit 0 + exec bash "$SHARED" "$@" +} + +main "$@"