dev-pulse 0.1.0

Project health dashboard for your terminal
use std::path::PathBuf;

use chrono::{DateTime, Utc};
use serde::Serialize;

use crate::ci::CiStatus;

/// Status information for a single project
#[derive(Clone, Debug, Serialize)]
pub struct ProjectStatus {
    /// Project name (directory name)
    pub name: String,
    /// Path to the project root
    #[allow(dead_code)]
    pub path: PathBuf,
    /// Current branch name
    pub branch: String,
    /// Whether the working tree is clean
    pub is_clean: bool,
    /// Number of changed (dirty) files
    pub changed_files: usize,
    /// Timestamp of the last commit
    pub last_commit: Option<DateTime<Utc>>,
    /// Commits ahead of upstream
    pub ahead: usize,
    /// Commits behind upstream
    pub behind: usize,
    /// Remote URL (e.g. GitHub URL) if available
    pub remote_url: Option<String>,
    /// Number of stash entries
    pub stash_count: usize,
    /// Subject line of the last commit (first line of commit message)
    pub last_commit_message: Option<String>,
    /// CI status from GitHub Actions (if available)
    pub ci_status: CiStatus,
}