pcu_lib

Trait GitOps

Source
pub trait GitOps {
    // Required methods
    fn branch_status(&self) -> Result<String, Error>;
    fn branch_list(&self) -> Result<String, Error>;
    fn repo_status(&self) -> Result<String, Error>;
    fn repo_files_not_staged(&self) -> Result<Vec<String>, Error>;
    fn repo_files_staged(&self) -> Result<Vec<String>, Error>;
    fn stage_files(&self, files: Vec<String>) -> Result<(), Error>;
    fn commit_staged(
        &self,
        sign: Sign,
        commit_message: &str,
        prefix: &str,
        tag: Option<&str>,
    ) -> Result<(), Error>;
    fn push_commit(
        &self,
        prefix: &str,
        version: Option<&str>,
        no_push: bool,
    ) -> Result<(), Error>;
    async fn label_next_pr(
        &self,
        author: Option<&str>,
        label: Option<&str>,
        desc: Option<&str>,
        colour: Option<&str>,
    ) -> Result<Option<String>, Error>;
    fn create_tag(
        &self,
        tag: &str,
        commit_id: Oid,
        sig: &Signature<'_>,
    ) -> Result<(), Error>;
    fn tag_exists(&self, tag: &str) -> bool;
    async fn get_commitish_for_tag(
        &self,
        version: &str,
    ) -> Result<String, Error>;
}

Required Methods§

Source

fn branch_status(&self) -> Result<String, Error>

Source

fn branch_list(&self) -> Result<String, Error>

Source

fn repo_status(&self) -> Result<String, Error>

Source

fn repo_files_not_staged(&self) -> Result<Vec<String>, Error>

Source

fn repo_files_staged(&self) -> Result<Vec<String>, Error>

Source

fn stage_files(&self, files: Vec<String>) -> Result<(), Error>

Source

fn commit_staged( &self, sign: Sign, commit_message: &str, prefix: &str, tag: Option<&str>, ) -> Result<(), Error>

Source

fn push_commit( &self, prefix: &str, version: Option<&str>, no_push: bool, ) -> Result<(), Error>

Source

async fn label_next_pr( &self, author: Option<&str>, label: Option<&str>, desc: Option<&str>, colour: Option<&str>, ) -> Result<Option<String>, Error>

Source

fn create_tag( &self, tag: &str, commit_id: Oid, sig: &Signature<'_>, ) -> Result<(), Error>

Source

fn tag_exists(&self, tag: &str) -> bool

Source

async fn get_commitish_for_tag(&self, version: &str) -> Result<String, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§