pub struct BranchManager { /* private fields */ }Expand description
Branch Manager for managing Git branches
Implementations§
Source§impl BranchManager
impl BranchManager
Sourcepub fn new(
token: impl Into<String>,
owner: impl Into<String>,
repo: impl Into<String>,
) -> Self
pub fn new( token: impl Into<String>, owner: impl Into<String>, repo: impl Into<String>, ) -> Self
Create a new BranchManager
Sourcepub async fn create_branch(
&self,
branch_name: impl Into<String>,
base_branch: impl Into<String>,
commit_sha: Option<String>,
) -> Result<BranchCreationResult>
pub async fn create_branch( &self, branch_name: impl Into<String>, base_branch: impl Into<String>, commit_sha: Option<String>, ) -> Result<BranchCreationResult>
Sourcepub async fn delete_branch(
&self,
branch_name: impl Into<String>,
) -> Result<BranchDeletionResult>
pub async fn delete_branch( &self, branch_name: impl Into<String>, ) -> Result<BranchDeletionResult>
Sourcepub async fn get_branch_info(
&self,
branch_name: impl Into<String>,
) -> Result<BranchInfo>
pub async fn get_branch_info( &self, branch_name: impl Into<String>, ) -> Result<BranchInfo>
Sourcepub async fn list_branches(&self) -> Result<Vec<String>>
pub async fn list_branches(&self) -> Result<Vec<String>>
Sourcepub async fn protect_branch(
&self,
branch_name: impl Into<String>,
protection: BranchProtection,
) -> Result<BranchLifecycleResult>
pub async fn protect_branch( &self, branch_name: impl Into<String>, protection: BranchProtection, ) -> Result<BranchLifecycleResult>
Sourcepub async fn unprotect_branch(
&self,
branch_name: impl Into<String>,
) -> Result<BranchLifecycleResult>
pub async fn unprotect_branch( &self, branch_name: impl Into<String>, ) -> Result<BranchLifecycleResult>
Sourcepub async fn rename_branch(
&self,
old_name: impl Into<String>,
new_name: impl Into<String>,
) -> Result<BranchLifecycleResult>
pub async fn rename_branch( &self, old_name: impl Into<String>, new_name: impl Into<String>, ) -> Result<BranchLifecycleResult>
Trait Implementations§
Source§impl Clone for BranchManager
impl Clone for BranchManager
Source§fn clone(&self) -> BranchManager
fn clone(&self) -> BranchManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BranchManager
impl RefUnwindSafe for BranchManager
impl Send for BranchManager
impl Sync for BranchManager
impl Unpin for BranchManager
impl UnwindSafe for BranchManager
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