Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
coverage.html
coverage.out
tmp/
# mise scaffolding, except the uv lock sidecars that mise.lock never embeds.
/.mise/*
!/.mise/locks/
16 changes: 16 additions & 0 deletions hk.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,20 @@ hooks {
["change-id"] = Extra.timber_commit_msg
}
}
["pre-commit"] {
fix = true
stage = true
stash = "git"
steps {
// No file filter: scan every staged change, including arbitrary types,
// binary files, deletions, and commits without Go or Markdown changes.
// The git-mode scan only sees text diffs, so staged binary bytes are
// checked out to a temporary directory and scanned explicitly.
["gitleaks"] = (Hk.gitleaks) {
scan = "staged"
check =
"gitleaks git --redact --pre-commit --staged --verbose --no-banner && tmp=$(mktemp -d) || exit $?; trap 'rm -rf \"$tmp\"' EXIT INT TERM; git diff --cached --name-only -z --diff-filter=ACMRT > \"$tmp/list\" || exit $?; git checkout-index -z --stdin --prefix=\"$tmp/tree/\" < \"$tmp/list\" || exit $?; mkdir -p \"$tmp/tree\" || exit $?; gitleaks dir --redact --verbose --no-banner \"$tmp/tree\" || exit $?"
}
}
}
}
2 changes: 1 addition & 1 deletion mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gofumpt = "latest"
hk = "2.10.0"
pkl = "latest"
"pypi:agentskills-tools" = "latest"
python = "3.13"
python = "latest"
staticcheck = "latest"
tombi = "latest"
uv = "latest"
Expand Down
Loading