Struct gitlab::api::projects::merge_requests::CreateMergeRequestBuilder
source · pub struct CreateMergeRequestBuilder<'a> { /* private fields */ }
Expand description
Builder for CreateMergeRequest
.
Implementations§
source§impl<'a> CreateMergeRequestBuilder<'a>
impl<'a> CreateMergeRequestBuilder<'a>
sourcepub fn project<VALUE: Into<NameOrId<'a>>>(&mut self, value: VALUE) -> &mut Self
pub fn project<VALUE: Into<NameOrId<'a>>>(&mut self, value: VALUE) -> &mut Self
The project to open the merge requset from.
sourcepub fn source_branch<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn source_branch<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self
The name of the source branch for the merge request.
sourcepub fn target_branch<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn target_branch<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self
The name of the target branch for the merge request.
sourcepub fn title<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn title<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
The title for the merge request.
sourcepub fn description<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn description<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE ) -> &mut Self
The description of the merge request.
sourcepub fn target_project_id(&mut self, value: u64) -> &mut Self
pub fn target_project_id(&mut self, value: u64) -> &mut Self
The ID of the target project for the merge request.
sourcepub fn milestone_id(&mut self, value: u64) -> &mut Self
pub fn milestone_id(&mut self, value: u64) -> &mut Self
The ID of the milestone to add the merge request to.
sourcepub fn approvals_before_merge(&mut self, value: u64) -> &mut Self
pub fn approvals_before_merge(&mut self, value: u64) -> &mut Self
How many approvals are required before merging will be allowed.
Note that this must be more than the project limit (if present).
sourcepub fn remove_source_branch(&mut self, value: bool) -> &mut Self
pub fn remove_source_branch(&mut self, value: bool) -> &mut Self
Whether to remove the source branch once merged or not.
sourcepub fn allow_collaboration(&mut self, value: bool) -> &mut Self
pub fn allow_collaboration(&mut self, value: bool) -> &mut Self
Whether to allow collaboration with maintainers of the target project or not.
sourcepub fn squash(&mut self, value: bool) -> &mut Self
pub fn squash(&mut self, value: bool) -> &mut Self
Whether to squash the branch when merging or not.
sourcepub fn allow_maintainer_to_push(&mut self, value: bool) -> &mut Self
pub fn allow_maintainer_to_push(&mut self, value: bool) -> &mut Self
Whether to allow collaboration with maintainers of the target project or not.
sourcepub fn build(
&self
) -> Result<CreateMergeRequest<'a>, CreateMergeRequestBuilderError>
pub fn build( &self ) -> Result<CreateMergeRequest<'a>, CreateMergeRequestBuilderError>
source§impl<'a> CreateMergeRequestBuilder<'a>
impl<'a> CreateMergeRequestBuilder<'a>
sourcepub fn unassigned(&mut self) -> &mut Self
pub fn unassigned(&mut self) -> &mut Self
Filter unassigned merge requests.
sourcepub fn assignee(&mut self, assignee: u64) -> &mut Self
pub fn assignee(&mut self, assignee: u64) -> &mut Self
Filter merge requests assigned to a user (by ID).
sourcepub fn assignees<I>(&mut self, iter: I) -> &mut Self
pub fn assignees<I>(&mut self, iter: I) -> &mut Self
Filter merge requests assigned to a users (by ID).
sourcepub fn without_reviewer(&mut self) -> &mut Self
pub fn without_reviewer(&mut self) -> &mut Self
Filter merge requests without a reviewer.
sourcepub fn reviewer(&mut self, reviewer: u64) -> &mut Self
pub fn reviewer(&mut self, reviewer: u64) -> &mut Self
Filter merge requests reviewed by a user (by ID).
Trait Implementations§
source§impl<'a> Clone for CreateMergeRequestBuilder<'a>
impl<'a> Clone for CreateMergeRequestBuilder<'a>
source§fn clone(&self) -> CreateMergeRequestBuilder<'a>
fn clone(&self) -> CreateMergeRequestBuilder<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for CreateMergeRequestBuilder<'a>
impl<'a> RefUnwindSafe for CreateMergeRequestBuilder<'a>
impl<'a> Send for CreateMergeRequestBuilder<'a>
impl<'a> Sync for CreateMergeRequestBuilder<'a>
impl<'a> Unpin for CreateMergeRequestBuilder<'a>
impl<'a> UnwindSafe for CreateMergeRequestBuilder<'a>
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
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>
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>
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