1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#![cfg_attr(coverage_nightly, coverage(off))]
//! Maintain subcommand execution
use super::super::CommandExecutor;
use anyhow::Result;
impl CommandExecutor {
/// Execute maintain subcommands
pub(super) async fn execute_maintain(
command: crate::cli::commands::MaintainCommands,
) -> Result<()> {
use crate::cli::commands::MaintainCommands;
match command {
MaintainCommands::Roadmap {
roadmap,
tickets_dir,
validate,
health,
fix,
generate_tickets,
dry_run,
format,
} => {
let config = crate::cli::handlers::roadmap_handler::RoadmapMaintenanceConfig::new(
validate,
health,
fix,
generate_tickets,
dry_run,
);
crate::cli::handlers::handle_maintain_roadmap(roadmap, tickets_dir, config, format)
.await
}
MaintainCommands::Health {
project_dir,
format,
quick,
all,
check_build,
check_tests,
check_coverage,
check_complexity,
check_satd,
} => {
let config = crate::cli::handlers::health_handler::HealthCheckConfig::new(
quick,
all,
check_build,
check_tests,
check_coverage,
check_complexity,
check_satd,
);
crate::cli::handlers::handle_maintain_health(project_dir, format, config).await
}
MaintainCommands::BugReport {
title,
dry_run,
interactive,
clear,
} => {
crate::cli::handlers::bug_report_handler::handle_bug_report(
title.as_deref(),
dry_run,
interactive,
clear,
)
.await
}
MaintainCommands::CleanupResources {
project_dir,
targets,
execute,
dry_run: _,
exclude,
min_age_days,
format,
} => {
crate::cli::handlers::cleanup_resources_handler::handle_cleanup_resources(
&project_dir,
&targets,
execute,
&exclude,
min_age_days,
format,
)
.await
}
}
}
}