Repository navigation
Conversation
… match - Break the alias across lines. The jq expression is inside single quotes, so literal newlines are safe; the outer shell pipeline stays in `$(...)` and reads top-to-bottom without wrapping. - Drop the `startswith($name + "-")` arm. It was meant to also match the sanitized-with-hash form, but only covers the specific 3-char suffix shape and would misfire on hook names that naturally end in `-<3alnum>`. Document the limitation instead: users with hook names that required sanitization should pass the on-disk sanitized form. A follow-up PR (dispatched separately) adds a `sanitize_hash` template filter so the alias can pre-sanitize its input and match reliably. Co-Authored-By: Claude <[email protected]>
worktrunk-bot
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small polish changes to the
hook-logalias recipe added in #2161:startswith($name + "-")branch. It was meant to also match the sanitized-with-hash form, but only covers the specific 3-char suffix shape and would misfire on hook names that naturally end in-<3alnum>. The limitation is documented instead: users with hook names that required sanitization should pass the on-disk sanitized form.A follow-up PR (dispatched separately) adds a
sanitize_hashtemplate filter so the alias can pre-sanitize its input and match reliably across all hook names.