mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Bryan Helmkamp <19+brynary@users.noreply.github.com>
This commit is contained in:
parent
885bc92122
commit
a966de25b3
1 changed files with 11 additions and 5 deletions
|
|
@ -99,11 +99,17 @@ pub(crate) fn check_goal_gates(
|
|||
graph: &GvGraph,
|
||||
node_outcomes: &HashMap<String, Outcome>,
|
||||
) -> std::result::Result<(), String> {
|
||||
for (node_id, node) in &graph.nodes {
|
||||
if node.goal_gate()
|
||||
&& !node_outcomes
|
||||
.get(node_id)
|
||||
.is_some_and(|outcome| outcome.status.is_successful())
|
||||
let mut goal_gate_ids: Vec<&String> = graph
|
||||
.nodes
|
||||
.iter()
|
||||
.filter_map(|(node_id, node)| node.goal_gate().then_some(node_id))
|
||||
.collect();
|
||||
goal_gate_ids.sort();
|
||||
|
||||
for node_id in goal_gate_ids {
|
||||
if !node_outcomes
|
||||
.get(node_id)
|
||||
.is_some_and(|outcome| outcome.status.is_successful())
|
||||
{
|
||||
return Err(node_id.clone());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue