v2.12.0: Restrict conventional commit scopes
hk 2.12.0 lets the check_conventional_commit builtin restrict which scopes a commit can use. It also fixes three bugs: misleading errors when a run is stopped by SIGTERM or SIGHUP, missing hooks after hk install --legacy on top of a global install, and stash restore failures caused by another linked worktree.
Added
Allowed scopes for conventional commits (#1817, @jonahsnider). Set
allowed_scopesoncheck_conventional_committo limit which scopes commit messages can use:["conventional-commit"] = (Builtins.check_conventional_commit) { allowed_scopes = List("web", "api") }Commits without a scope are always accepted. A commit with any other scope is rejected, and the error lists the allowed scopes. If you omit
allowed_scopes, any scope is accepted. To accept only commits without a scope, setallowed_scopes = List(). Each list entry must hold one scope, with no commas. The same option is available directly ashk util check-conventional-commit --allowed-scopes web,api.