pub struct GitLabReviewProvider { /* private fields */ }Expand description
GitLab Review 提供者,通过 glab CLI 操作。
§Examples
use gitflow_gitlab::GitLabReviewProvider;
let provider = GitLabReviewProvider::new("gitlab-org/gitlab");Implementations§
Trait Implementations§
Source§impl Clone for GitLabReviewProvider
impl Clone for GitLabReviewProvider
Source§fn clone(&self) -> GitLabReviewProvider
fn clone(&self) -> GitLabReviewProvider
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 GitLabReviewProvider
impl Debug for GitLabReviewProvider
Source§impl ReviewProvider for GitLabReviewProvider
impl ReviewProvider for GitLabReviewProvider
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,
在指定 MR 上添加审查评论。
调用 glab mr note 发布评论,并通过 glab mr view 获取当前用户信息
以构造 ReviewData。
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,
批准指定 MR。
调用 glab mr approve 批准 MR,然后构造 ReviewData。
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,
对指定 MR 要求修改。
glab 没有直接的 “request changes” 命令,通过 glab mr note 发布
包含要求修改意见的评论,并标记为 ChangesRequested 状态。
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,
提交指定 MR 的审查。
根据 event 参数分别调用 glab mr approve、glab mr revoke 或
glab mr note 实现不同的审查操作。
Auto Trait Implementations§
impl Freeze for GitLabReviewProvider
impl RefUnwindSafe for GitLabReviewProvider
impl Send for GitLabReviewProvider
impl Sync for GitLabReviewProvider
impl Unpin for GitLabReviewProvider
impl UnsafeUnpin for GitLabReviewProvider
impl UnwindSafe for GitLabReviewProvider
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