pub fn compose_hooks(
template: &str,
workflow: Option<&WorkflowHooks<'_>>,
parts: &TrunkGuards<'_>,
) -> StringExpand description
The hook block from its authored template.
The block always carries the status check, and the tag guard wherever
parts names a release. workflow adds the workflow guards’ hooks
where the target selects them, and drops the scope requirement from the
commit hook where the record names no release.
parts is the integration mode’s answer, and the workflow guards add
the trunk guards of that mode. Under forge integration they are
no-commit-to-branch and rk-no-push-to-trunk, because a request is
the one way in. Under local integration they are no-commit-to-branch
at the pre-commit stage alone and two pre-push guards against a force
push and a merge commit on the trunk, because rk integrate moves the
trunk with no commit hook and the operator pushes the trunk. Local
integration’s header also carries the pre-integrate note.
The one branch grammar substitutes from BRANCH_GRAMMAR. Markers
included, without a trailing newline and with its scope token
unrendered.