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§
fn review_for_branch(&self, branch: &str) -> Result<Option<ReviewRequest>>
Sourcefn review_for_branch_including_closed(
&self,
branch: &str,
) -> Result<Option<ReviewRequest>>
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.
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>
Sourcefn merge_review(
&self,
review: &ReviewRequest,
strategy: &str,
auto: bool,
) -> Result<String>
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".