pub struct GitHubClient { /* private fields */ }Implementations§
Source§impl GitHubClient
impl GitHubClient
pub fn new(owner: String, repo: String, token: Option<String>) -> Result<Self>
pub async fn get_pr_from_branch(&self, branch: &str) -> Result<Option<u64>>
pub async fn get_review_comments( &self, pr_number: u64, include_resolved: Option<bool>, include_replies: Option<bool>, author: Option<&str>, offset: Option<usize>, limit: Option<usize>, ) -> Result<Vec<ReviewComment>>
pub async fn list_prs(&self, state: Option<String>) -> Result<Vec<PrSummary>>
pub async fn get_review_thread_resolution_status( &self, pr_number: u64, ) -> Result<HashMap<u64, bool>>
Sourcepub async fn fetch_review_comments(
&self,
pr_number: u64,
) -> Result<Vec<ReviewComment>>
pub async fn fetch_review_comments( &self, pr_number: u64, ) -> Result<Vec<ReviewComment>>
Fetch all review comments for a PR without complex filtering. Returns all comments in API order.
Sourcepub fn build_threads(
&self,
comments: Vec<ReviewComment>,
resolution_map: &HashMap<u64, bool>,
) -> Vec<Thread>
pub fn build_threads( &self, comments: Vec<ReviewComment>, resolution_map: &HashMap<u64, bool>, ) -> Vec<Thread>
Build threads from a flat list of comments. Groups comments by parent ID; top-level comments become thread parents.
Sourcepub fn filter_threads(
&self,
threads: Vec<Thread>,
src: CommentSourceType,
include_resolved: bool,
) -> Vec<Thread>
pub fn filter_threads( &self, threads: Vec<Thread>, src: CommentSourceType, include_resolved: bool, ) -> Vec<Thread>
Filter threads by resolution status and comment source type.
Sourcepub async fn reply_to_comment(
&self,
pr_number: u64,
comment_id: u64,
body: &str,
) -> Result<ReviewComment>
pub async fn reply_to_comment( &self, pr_number: u64, comment_id: u64, body: &str, ) -> Result<ReviewComment>
Reply to an existing review comment on a PR. Returns the created comment.
Auto 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> 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