pub fn hooks_block(
source: &dyn ReleaseSource,
workflow: Workflow,
) -> Result<String, RkError>Expand description
The hook block for one workflow mode, read from the bundle source
carries.
Authored as blocks/pre-commit-block.yaml.in with the worktree mode’s
guard entry beside it in blocks/pre-commit-worktree-guard.yaml.in.
Markers included, without a
trailing newline and with its scope token unrendered. What is landed
is what runs: the worktree mode’s block carries the location guard and
names the sweep-skip pair, and the branches mode’s block carries no
guard entry at all — never an entry that reads local state to decide
whether to enforce. The one branch grammar substitutes here from
BRANCH_GRAMMAR.
§Errors
Returns the source’s failures for a bundle that does not carry the block.