Skip to main content

ReviewProvider

Trait ReviewProvider 

Source
pub trait ReviewProvider {
    // Required methods
    fn review_for_branch(&self, branch: &str) -> Result<Option<ReviewRequest>>;
    fn review_for_branch_including_closed(
        &self,
        branch: &str,
    ) -> Result<Option<ReviewRequest>>;
    fn create_review(&self, branch: &str, base: &str) -> Result<String>;
    fn update_review_base(
        &self,
        review: &ReviewRequest,
        base: &str,
    ) -> Result<String>;
    fn review_body(&self, review: &ReviewRequest) -> Result<String>;
    fn update_review_body(
        &self,
        review: &ReviewRequest,
        body: &str,
    ) -> Result<String>;
    fn merge_review(
        &self,
        review: &ReviewRequest,
        strategy: &str,
        auto: bool,
    ) -> Result<String>;
}

Required Methods§

Source

fn review_for_branch(&self, branch: &str) -> Result<Option<ReviewRequest>>

Source

fn review_for_branch_including_closed( &self, branch: &str, ) -> Result<Option<ReviewRequest>>

Like review_for_branch, but also finds closed reviews. Kept separate so flows that act on a review (submit, sync, cleanup) never mistake a dead review for a live one; only the stack-notes ledger wants closed state, to restyle the entry rather than drop it.

Source

fn create_review(&self, branch: &str, base: &str) -> Result<String>

Source

fn update_review_base( &self, review: &ReviewRequest, base: &str, ) -> Result<String>

Source

fn review_body(&self, review: &ReviewRequest) -> Result<String>

Source

fn update_review_body( &self, review: &ReviewRequest, body: &str, ) -> Result<String>

Source

fn merge_review( &self, review: &ReviewRequest, strategy: &str, auto: bool, ) -> Result<String>

Merge the review with the given strategy: squash, rebase, or merge. With auto, schedule the merge for when required checks pass instead of merging now.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§