pub fn start_refusal(index: &Index, plan: &Plan, issue: &str) -> Option<String>Expand description
Why the start transition of issue is refused, or None when it is not this module’s
to refuse: the policy does not say intent.binding: required, or the issue’s binding is
bound or maintenance. The sentence is the one majordomus plan start prints in the shell
engine, which asks the same capability; cases 133 and 962 hold the two equal.
A task is one way work begins and a transition is the other. Gating only the first would
leave a door beside the gate, so crate::plan::check asks this before it lets an issue
become ACTIVE.
use majordomus_cli::intent_binding::start_refusal;
use majordomus_cli::plan::Plan;
use majordomus_cli::synthetic::SyntheticRepository;
let repo = SyntheticRepository::small().unwrap();
let index = repo.index().unwrap();
let plan = Plan::build(&index);
// a repository whose policy does not require binding refuses nothing here
assert_eq!(start_refusal(&index, &plan, "I0001"), None);