#![cfg_attr(coverage_nightly, coverage(off))]
use crate::cli::OutputFormat;
use anyhow::Result;
use serde::Serialize;
use std::collections::HashMap;
use std::fs;
use std::path::{Path, PathBuf};
#[derive(Debug, Clone)]
pub struct RoadmapMaintenanceConfig {
pub validate: bool,
pub health: bool,
pub fix: bool,
pub generate_tickets: bool,
pub dry_run: bool,
}
impl RoadmapMaintenanceConfig {
#[provable_contracts_macros::contract("pmat-core.yaml", equation = "check_compliance")]
pub fn new(
validate: bool,
health: bool,
fix: bool,
generate_tickets: bool,
dry_run: bool,
) -> Self {
Self {
validate,
health,
fix,
generate_tickets,
dry_run,
}
}
#[provable_contracts_macros::contract("pmat-core.yaml", equation = "check_compliance")]
pub fn has_actions(&self) -> bool {
self.validate || self.health || self.fix || self.generate_tickets
}
}
#[derive(Debug)]
pub struct RoadmapValidation {
pub valid: bool,
pub errors: Vec<String>,
pub warnings: Vec<String>,
}
#[derive(Debug, Serialize)]
pub struct SprintInfo {
pub name: String,
pub total_tickets: usize,
pub completed_tickets: usize,
pub status: SprintStatus,
}
#[derive(Debug, PartialEq, Serialize)]
pub enum SprintStatus {
NotStarted,
InProgress,
Complete,
}
#[derive(Debug, PartialEq)]
pub enum TicketStatus {
Red,
Green,
Yellow,
Unknown,
}
#[derive(Debug, Serialize)]
pub struct TicketGenerationResult {
pub generated: Vec<String>,
pub skipped: Vec<String>,
}
include!("roadmap_handler_commands.rs");
include!("roadmap_handler_display.rs");
include!("roadmap_handler_parsing.rs");
include!("roadmap_handler_tests.rs");