securegit 0.8.5

Zero-trust git replacement with 12 built-in security scanners, LLM redteam bridge, universal undo, durable backups, and a 50-tool MCP server
Documentation
use serde::{Deserialize, Serialize};

/// Request to create a pull request / merge request.
#[derive(Debug, Clone)]
pub struct CreatePR {
    pub title: String,
    pub body: String,
    pub head: String,
    pub base: String,
    pub draft: bool,
}

/// A pull request / merge request returned from the API.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PullRequest {
    pub number: u64,
    pub title: String,
    pub state: String,
    pub html_url: String,
    pub head_ref: String,
    pub base_ref: String,
    pub draft: bool,
    pub user: String,
    pub created_at: String,
}

/// Request to create an issue.
#[derive(Debug, Clone)]
pub struct CreateIssue {
    pub title: String,
    pub body: String,
    pub labels: Vec<String>,
}

/// An issue returned from the API.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Issue {
    pub number: u64,
    pub title: String,
    pub state: String,
    pub html_url: String,
}

/// Request to create a release.
#[derive(Debug, Clone)]
pub struct CreateRelease {
    pub tag_name: String,
    pub name: String,
    pub body: String,
    pub draft: bool,
    pub prerelease: bool,
}

/// A release returned from the API.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Release {
    pub id: u64,
    pub tag_name: String,
    pub name: String,
    pub html_url: String,
    pub upload_url: String,
    pub draft: bool,
    pub prerelease: bool,
    pub created_at: String,
}

/// A CI/CD check run.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CheckRun {
    pub name: String,
    pub status: String,
    pub conclusion: Option<String>,
    pub html_url: Option<String>,
    pub started_at: Option<String>,
    pub completed_at: Option<String>,
}

/// Request to create a repository on a remote server.
#[derive(Debug, Clone)]
pub struct CreateRepo {
    pub name: String,
    pub description: Option<String>,
    pub private: bool,
    /// GitHub org or GitLab group path (default: user's personal namespace)
    pub namespace: Option<String>,
}

/// A repository returned from the API.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Repository {
    pub id: u64,
    pub name: String,
    pub full_name: String,
    pub web_url: String,
    pub clone_url_http: String,
    pub clone_url_ssh: Option<String>,
    pub private: bool,
}

/// Combined commit status.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CombinedStatus {
    pub state: String,
    pub total_count: u64,
    pub check_runs: Vec<CheckRun>,
}