pub struct GitHubClient { /* private fields */ }Implementations§
Source§impl GitHubClient
impl GitHubClient
Sourcepub async fn fetch_commit_info(
&self,
commit_hash: &str,
) -> Option<(String, String, Option<(String, String)>)>
pub async fn fetch_commit_info( &self, commit_hash: &str, ) -> Option<(String, String, Option<(String, String)>)>
Fetch the GitHub username and URLs for a commit Returns None if the commit doesn’t exist on GitHub
Sourcepub async fn fetch_pr(&self, number: u64) -> Option<PullRequestInfo>
pub async fn fetch_pr(&self, number: u64) -> Option<PullRequestInfo>
Try to fetch a PR
Sourcepub async fn fetch_issue(&self, number: u64) -> Option<IssueInfo>
pub async fn fetch_issue(&self, number: u64) -> Option<IssueInfo>
Try to fetch an issue
Sourcepub async fn fetch_releases(&self) -> Vec<ReleaseInfo>
pub async fn fetch_releases(&self) -> Vec<ReleaseInfo>
Fetch all releases from GitHub
Sourcepub async fn fetch_releases_since(
&self,
since_date: Option<&str>,
) -> Vec<ReleaseInfo>
pub async fn fetch_releases_since( &self, since_date: Option<&str>, ) -> Vec<ReleaseInfo>
Fetch releases from GitHub, optionally filtered by date
If since_date is provided, stop fetching releases older than this date
This significantly speeds up lookups for recent PRs/issues
Sourcepub async fn fetch_release_by_tag(&self, tag: &str) -> Option<ReleaseInfo>
pub async fn fetch_release_by_tag(&self, tag: &str) -> Option<ReleaseInfo>
Fetch a GitHub release by tag.
Sourcepub fn commit_url(&self, hash: &str) -> String
pub fn commit_url(&self, hash: &str) -> String
Build GitHub URLs for various things Build a commit URL (fallback when API data unavailable) Uses URL encoding to prevent injection
Sourcepub fn tag_url(&self, tag: &str) -> String
pub fn tag_url(&self, tag: &str) -> String
Build a tag URL (fallback when API data unavailable) Uses URL encoding to prevent injection
Sourcepub fn profile_url(username: &str) -> String
pub fn profile_url(username: &str) -> String
Build a profile URL (fallback when API data unavailable) Uses URL encoding to prevent injection
Trait Implementations§
Source§impl Clone for GitHubClient
impl Clone for GitHubClient
Source§fn clone(&self) -> GitHubClient
fn clone(&self) -> GitHubClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for GitHubClient
impl !RefUnwindSafe for GitHubClient
impl Send for GitHubClient
impl Sync for GitHubClient
impl Unpin for GitHubClient
impl !UnwindSafe for GitHubClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more