Skip to content

Install opt-in hk hooks in eligible new worktrees - #80

Merged
nnutter merged 8 commits into
masterfrom
auto-hk
Oct 22, 2026
Merged

nnutter merged 8 commits into
masterfrom
auto-hk

Conversation

@nnutter

@nnutter nnutter commented Oct 22, 2026

Copy link
Copy Markdown
Owner

No description provided.

Automatic hk hook installation will need the same symlink-safe root file
check before it inspects `hk.pkl`.
Automatic mise trust and automatic hk hook installation must agree on
which repositories are eligible for code-running automation.
Let users enable or disable hk hook installation ahead of worktree
creation. Default to disabled because installed hooks can execute
repository code.
Run hk install after mise trust when a worktree has a root-level hk.pkl
and its GitHub upstream is owned by the user or an organization. Add
--mise only when a regular root mise.toml exists so hooks can use
mise-managed tools without forcing the option in repositories that do
not use mise.

Warn and keep the worktree when hk is missing or fails.
The helper only knows the shared `[y/N]` prompt, and automatic hk hook
installation tests will use it too.
Automatic mise trust and automatic hk hook installation must present the
same account and organization context before asking for consent.
Ask on the first eligible interactive worktree when the setting is
undecided, defaulting to No because installed hooks run repository code.
Save either answer in a decision marker so an explicit refusal is not
mistaken for the disabled default and the prompt does not repeat.

Show the GitHub account and organizations covered by the choice, and
point to `timber config --auto-hk-install` after refusal.
hk install --mise wraps hooks in mise, so the new worktree must be
trusted before hooks are installed. Pin the ordering required by the
automatic setup in create.
@nnutter nnutter changed the title Optionally install hk hooks in eligible new worktrees Install opt-in hk hooks in eligible new worktrees Oct 22, 2026
@nnutter
nnutter merged commit 6dea798 into master Oct 22, 2026
1 check passed
@nnutter
nnutter deleted the auto-hk branch October 22, 2026 15:19
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