pub struct GitCodeReviewProvider { /* private fields */ }Expand description
GitCode Review 提供者,通过 gitcode CLI 操作。
该结构体通过调用 gitcode CLI 实现 ReviewProvider trait 的所有方法,
使上层命令能够以统一的方式操作 GitCode PR 审查。
§Examples
use gitflow_gitcode::GitCodeReviewProvider;
let provider = GitCodeReviewProvider::new("octocat/hello-world");Implementations§
Trait Implementations§
Source§impl Clone for GitCodeReviewProvider
impl Clone for GitCodeReviewProvider
Source§fn clone(&self) -> GitCodeReviewProvider
fn clone(&self) -> GitCodeReviewProvider
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 GitCodeReviewProvider
impl Debug for GitCodeReviewProvider
Source§impl ReviewProvider for GitCodeReviewProvider
impl ReviewProvider for GitCodeReviewProvider
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 GitCodeReviewProvider
impl RefUnwindSafe for GitCodeReviewProvider
impl Send for GitCodeReviewProvider
impl Sync for GitCodeReviewProvider
impl Unpin for GitCodeReviewProvider
impl UnsafeUnpin for GitCodeReviewProvider
impl UnwindSafe for GitCodeReviewProvider
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