version_bump/runner

Hook runners — the glue that drives a list of resolved plugins through one lifecycle hook each, applying the per-hook combination semantics the plugin contract documents.

A “resolved plugin” is a #(PluginSpec, Plugin) pair: the spec carries the user’s options, the plugin carries the hook implementations. Each runner folds over the list, looks up the relevant Option(hook) on each plugin, skips plugins that don’t implement it (None), and combines the results:

Types

A plugin resolved against the registry: its configured spec plus the hook implementations to run.

pub type ResolvedPlugin =
  #(config.PluginSpec, plugin.Plugin)

Values

pub fn run_analyze_commits(
  plugins: List(#(config.PluginSpec, plugin.Plugin)),
  context: context.Context,
) -> Result(option.Option(semver.ReleaseType), error.ReleaseError)

Run analyze_commits across all plugins and return the highest implied ReleaseType (by release_type_rank), or None when no plugin warrants a release. The first error short-circuits.

pub fn run_fail(
  plugins: List(#(config.PluginSpec, plugin.Plugin)),
  context: context.Context,
) -> Result(Nil, error.ReleaseError)

Run fail across all plugins, aggregating any failures.

pub fn run_generate_notes(
  plugins: List(#(config.PluginSpec, plugin.Plugin)),
  context: context.Context,
) -> Result(String, error.ReleaseError)

Run generate_notes across all plugins, concatenating each plugin’s notes in plugin order. Empty contributions add nothing; non-empty ones are joined with a blank line between sections. The first error short-circuits.

pub fn run_prepare(
  plugins: List(#(config.PluginSpec, plugin.Plugin)),
  context: context.Context,
) -> Result(Nil, error.ReleaseError)

Run prepare across all plugins, aggregating any failures.

pub fn run_publish(
  plugins: List(#(config.PluginSpec, plugin.Plugin)),
  context: context.Context,
) -> task.Task(Result(List(release.Release), error.ReleaseError))

Run publish across all plugins, collecting the Some(release) results in plugin order. Plugins returning None (not handled) contribute nothing. The first error short-circuits.

publish is asynchronous, so the plugins are chained sequentially through a Task: each plugin’s publish runs after the previous one resolves, and the whole sequence yields a single Task of the collected releases.

pub fn run_success(
  plugins: List(#(config.PluginSpec, plugin.Plugin)),
  context: context.Context,
) -> Result(Nil, error.ReleaseError)

Run success across all plugins, aggregating any failures.

pub fn run_verify_conditions(
  plugins: List(#(config.PluginSpec, plugin.Plugin)),
  context: context.Context,
) -> Result(Nil, error.ReleaseError)

Run verify_conditions across all plugins, aggregating any failures.

pub fn run_verify_release(
  plugins: List(#(config.PluginSpec, plugin.Plugin)),
  context: context.Context,
) -> Result(Nil, error.ReleaseError)

Run verify_release across all plugins, aggregating any failures.

Search Document