GitHoox.Runner (GitHoox v0.1.0)

Copy Markdown View Source

Execute hooks for a given stage.

Resolves the file set per stage, filters per hook's :files glob, dispatches serially or in parallel, enforces per-hook timeouts, and re-stages mutated files when stage_fixed: true.

Summary

Types

One hook's exit summary.

Functions

Run all hooks configured for stage.

Types

hook_outcome()

@type hook_outcome() :: {module(), GitHoox.hook_result()}

One hook's exit summary.

Functions

run(stage, args \\ [], stdin \\ nil)

@spec run(GitHoox.stage(), [String.t()], String.t() | nil) ::
  :ok | {:error, [hook_outcome()]}

Run all hooks configured for stage.

args are the positional arguments the git shim received (e.g. the commit message file path for commit_msg). stdin is the raw input passed to the shim, used for pre_push.