research_topics::create: bag 8 args into a NewTopic struct (fixes clippy)
The prior signature took (pool, workspace_id, title, description, outcome_kind, topology_kind, repo_id, created_by) — 8 args, one over the clippy::too_many_arguments ceiling and blocking CI. Refactor to a NewTopic<'a> input struct mirroring the NewLoop / NewSubTopology pattern the codebase already uses. Wizard-side additions like a repo commit branch land as struct fields instead of cascading into every call site.
This commit is contained in:
@@ -275,13 +275,15 @@ async fn notify_run_completed_transitions_topic_when_no_siblings_in_flight() {
|
||||
|
||||
let topic = research_topics::create(
|
||||
&pool,
|
||||
ws.as_uuid(),
|
||||
"Topic",
|
||||
"desc",
|
||||
"spec",
|
||||
"hub_spoke",
|
||||
None,
|
||||
user_id.as_uuid(),
|
||||
research_topics::NewTopic {
|
||||
workspace_id: ws.as_uuid(),
|
||||
title: "Topic",
|
||||
description: "desc",
|
||||
outcome_kind: "spec",
|
||||
topology_kind: "hub_spoke",
|
||||
repo_id: None,
|
||||
created_by: user_id.as_uuid(),
|
||||
},
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -326,13 +328,15 @@ async fn notify_run_completed_leaves_topic_processing_when_siblings_in_flight()
|
||||
|
||||
let topic = research_topics::create(
|
||||
&pool,
|
||||
ws.as_uuid(),
|
||||
"Topic",
|
||||
"desc",
|
||||
"spec",
|
||||
"hub_spoke",
|
||||
None,
|
||||
user_id.as_uuid(),
|
||||
research_topics::NewTopic {
|
||||
workspace_id: ws.as_uuid(),
|
||||
title: "Topic",
|
||||
description: "desc",
|
||||
outcome_kind: "spec",
|
||||
topology_kind: "hub_spoke",
|
||||
repo_id: None,
|
||||
created_by: user_id.as_uuid(),
|
||||
},
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user