use rmcp::schemars;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Repository {
pub full_name: String,
pub description: Option<String>,
pub html_url: String,
pub default_branch: String,
pub language: Option<String>,
pub stargazers_count: u64,
pub open_issues_count: u64,
pub private: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Branch {
pub name: String,
pub protected: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FileContent {
pub path: String,
pub content: String,
pub sha: String,
pub size: u64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Issue {
pub number: u64,
pub title: String,
pub state: String,
pub html_url: String,
pub body: Option<String>,
pub user: Option<String>,
pub labels: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PullRequest {
pub number: u64,
pub title: String,
pub state: String,
pub html_url: String,
pub head: String,
pub base: String,
pub user: Option<String>,
pub mergeable: Option<bool>,
pub additions: Option<u64>,
pub deletions: Option<u64>,
pub changed_files: Option<u64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Release {
pub tag_name: String,
pub name: Option<String>,
pub html_url: String,
pub published_at: Option<String>,
pub draft: bool,
pub prerelease: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SearchResult {
pub full_name: String,
pub description: Option<String>,
pub html_url: String,
pub stargazers_count: u64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CodeSearchResult {
pub path: String,
pub repository: String,
pub html_url: String,
pub fragment: Option<String>,
}