pub struct Repository {Show 23 fields
pub id: String,
pub name: String,
pub name_with_owner: String,
pub description: Option<String>,
pub url: String,
pub homepage_url: Option<String>,
pub created_at: String,
pub updated_at: String,
pub pushed_at: Option<String>,
pub is_private: bool,
pub is_fork: bool,
pub is_archived: bool,
pub stargazer_count: u32,
pub fork_count: u32,
pub watchers: TotalCount,
pub issues: TotalCount,
pub pull_requests: TotalCount,
pub releases: TotalCount,
pub primary_language: Option<Language>,
pub languages: LanguageConnection,
pub license_info: Option<License>,
pub default_branch_ref: Option<Branch>,
pub repository_topics: TopicConnection,
}Expand description
Full repository information from GitHub API.
Contains comprehensive details about a repository including metadata, statistics, and related information.
Fields§
§id: StringGitHub’s internal ID for the repository
name: StringRepository name (without owner)
name_with_owner: StringFull repository name in “owner/repo” format
description: Option<String>Repository description
url: StringGitHub URL for the repository
homepage_url: Option<String>Custom homepage URL if set
created_at: StringISO 8601 timestamp when repository was created
updated_at: StringISO 8601 timestamp of last update
pushed_at: Option<String>ISO 8601 timestamp of last push
is_private: boolWhether the repository is private
is_fork: boolWhether the repository is a fork
is_archived: boolWhether the repository is archived
stargazer_count: u32Number of stars
fork_count: u32Number of forks
watchers: TotalCountNumber of watchers
issues: TotalCountNumber of open issues
pull_requests: TotalCountNumber of pull requests
releases: TotalCountNumber of releases
primary_language: Option<Language>Primary programming language
languages: LanguageConnectionAll languages used in the repository
license_info: Option<License>License information
default_branch_ref: Option<Branch>Default branch reference
repository_topics: TopicConnectionRepository topics/tags
Implementations§
Source§impl Repository
impl Repository
Sourcepub fn language(&self) -> Option<&str>
pub fn language(&self) -> Option<&str>
Returns the primary language name, or None if not set.
§Example
let service = GitHubService::new()?;
let repo = service.get_repository_info("rust-lang", "rust").await?;
if let Some(lang) = repo.language() {
println!("Primary language: {}", lang);
}Sourcepub fn license_spdx(&self) -> Option<&str>
pub fn license_spdx(&self) -> Option<&str>
Returns the SPDX license identifier, or None if not available.
Sourcepub fn default_branch(&self) -> Option<&str>
pub fn default_branch(&self) -> Option<&str>
Returns the default branch name, or None if not set.
Sourcepub fn topics(&self) -> Vec<&str>
pub fn topics(&self) -> Vec<&str>
Returns a list of topic names.
§Example
let service = GitHubService::new()?;
let repo = service.get_repository_info("rust-lang", "rust").await?;
for topic in repo.topics() {
println!("Topic: {}", topic);
}Sourcepub fn open_issues(&self) -> u32
pub fn open_issues(&self) -> u32
Returns the number of open issues.
Sourcepub fn watcher_count(&self) -> u32
pub fn watcher_count(&self) -> u32
Returns the number of watchers.