Skip to main content

build_allocation

Function build_allocation 

Source
pub fn build_allocation(
    evt: &PullRequestEvent,
    namespace: &str,
    pool_name: Option<&str>,
    include_drafts: bool,
) -> Result<EphemeralAllocation, FactoryError>
Expand description

Build a typed EphemeralAllocation from a PR event.

Routing knobs:

  • namespace — where to create the Allocation. Same namespace as the pool (typically ephemeral-pools).
  • pool_name — when Some, pin the allocation to a named pool (skips selector routing). When None, the reconciler matches via PoolSelector.
  • include_drafts — when false, draft PRs return DraftExcluded.