pub struct GitHubReviewProvider { /* private fields */ }Expand description
GitHub Review 提供者,通过 gh CLI 操作。
该结构体通过调用 gh CLI 实现 ReviewProvider trait 的所有方法,
使上层命令能够以统一的方式操作 GitHub PR 审查。
§Examples
use gitflow_github::GitHubReviewProvider;
let provider = GitHubReviewProvider::new("octocat/hello-world");Implementations§
Trait Implementations§
Source§impl Clone for GitHubReviewProvider
impl Clone for GitHubReviewProvider
Source§fn clone(&self) -> GitHubReviewProvider
fn clone(&self) -> GitHubReviewProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GitHubReviewProvider
impl Debug for GitHubReviewProvider
Source§impl ReviewProvider for GitHubReviewProvider
impl ReviewProvider for GitHubReviewProvider
Source§fn comment<'life0, 'life1, 'async_trait>(
&'life0 self,
pr_number: u64,
body: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReviewData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn comment<'life0, 'life1, 'async_trait>(
&'life0 self,
pr_number: u64,
body: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReviewData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
在指定 PR 上发表评论。 Read more
Source§fn approve<'life0, 'life1, 'async_trait>(
&'life0 self,
pr_number: u64,
body: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ReviewData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn approve<'life0, 'life1, 'async_trait>(
&'life0 self,
pr_number: u64,
body: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ReviewData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
批准指定 PR。 Read more
Source§fn request_changes<'life0, 'life1, 'async_trait>(
&'life0 self,
pr_number: u64,
body: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReviewData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn request_changes<'life0, 'life1, 'async_trait>(
&'life0 self,
pr_number: u64,
body: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReviewData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
要求对指定 PR 进行修改。 Read more
Source§fn submit_review<'life0, 'life1, 'async_trait>(
&'life0 self,
pr_number: u64,
event: ReviewState,
body: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ReviewData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn submit_review<'life0, 'life1, 'async_trait>(
&'life0 self,
pr_number: u64,
event: ReviewState,
body: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<ReviewData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
提交一次完整的 Review。 Read more
Auto Trait Implementations§
impl Freeze for GitHubReviewProvider
impl RefUnwindSafe for GitHubReviewProvider
impl Send for GitHubReviewProvider
impl Sync for GitHubReviewProvider
impl Unpin for GitHubReviewProvider
impl UnsafeUnpin for GitHubReviewProvider
impl UnwindSafe for GitHubReviewProvider
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