pub struct GitHubApiClient { /* private fields */ }Expand description
GitHub API client for fetching PR files
Implementations§
Source§impl GitHubApiClient
impl GitHubApiClient
Sourcepub async fn fetch_changed_files(
&self,
owner: &str,
repo: &str,
pr_number: u32,
interner: &StringInterner,
) -> Result<DiffResult>
pub async fn fetch_changed_files( &self, owner: &str, repo: &str, pr_number: u32, interner: &StringInterner, ) -> Result<DiffResult>
Fetch changed files for a pull request
Sourcepub async fn compare_refs(
&self,
owner: &str,
repo: &str,
base: &str,
head: &str,
interner: &StringInterner,
) -> Result<DiffResult>
pub async fn compare_refs( &self, owner: &str, repo: &str, base: &str, head: &str, interner: &StringInterner, ) -> Result<DiffResult>
Compare two refs and get changed files
Endpoint: GET /repos/{owner}/{repo}/compare/{base}…{head} Useful for non-PR contexts where git diff is not available.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GitHubApiClient
impl !UnwindSafe for GitHubApiClient
impl Freeze for GitHubApiClient
impl Send for GitHubApiClient
impl Sync for GitHubApiClient
impl Unpin for GitHubApiClient
impl UnsafeUnpin for GitHubApiClient
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> 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