pub struct WorkflowOps<'a> { /* private fields */ }Available on crate feature
workflow only.Expand description
High-level workflow helpers, scoped to a Repository.
Implementations§
Source§impl<'a> WorkflowOps<'a>
impl<'a> WorkflowOps<'a>
Sourcepub async fn feature_branch(
&self,
name: impl Into<String>,
base: impl Into<String>,
) -> Result<()>
pub async fn feature_branch( &self, name: impl Into<String>, base: impl Into<String>, ) -> Result<()>
Create a new branch name starting at base and switch to it.
Equivalent to git checkout -b <name> <base>. Errors if a branch
named name already exists.
Sourcepub async fn commit_all(&self, message: impl Into<String>) -> Result<()>
pub async fn commit_all(&self, message: impl Into<String>) -> Result<()>
Stage every change in the working tree and commit them with message.
Equivalent to git add -A followed by git commit -m <message>.
Errors if there is nothing to commit.
Sourcepub async fn sync(&self) -> Result<()>
pub async fn sync(&self) -> Result<()>
Bring the current branch up to date with its upstream via rebase.
Equivalent to git pull --rebase. Errors if no upstream is configured
or the rebase has conflicts.
Sourcepub async fn squash_merge(&self, branch: impl Into<String>) -> Result<()>
pub async fn squash_merge(&self, branch: impl Into<String>) -> Result<()>
Squash-merge branch into the current branch.
Equivalent to git merge --squash <branch>. The changes are staged
but not committed — callers should follow up with
commit_all or a raw commit to record them.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for WorkflowOps<'a>
impl<'a> RefUnwindSafe for WorkflowOps<'a>
impl<'a> Send for WorkflowOps<'a>
impl<'a> Sync for WorkflowOps<'a>
impl<'a> Unpin for WorkflowOps<'a>
impl<'a> UnsafeUnpin for WorkflowOps<'a>
impl<'a> UnwindSafe for WorkflowOps<'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
Mutably borrows from an owned value. Read more