pub trait VersionControl {
// Required methods
fn init(
hostname: String,
repo: String,
settings: VersionControlSettings
) -> Self
where Self: Sized;
fn login_url(&self) -> String;
fn validate_token(&self, token: &str) -> Result<()>;
fn create_pr<'life0, 'async_trait>(
&'life0 self,
pr: CreatePullRequest
) -> Pin<Box<dyn Future<Output = Result<PullRequest>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_pr_by_id<'life0, 'async_trait>(
&'life0 self,
id: u32
) -> Pin<Box<dyn Future<Output = Result<PullRequest>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_pr_by_branch<'life0, 'life1, 'async_trait>(
&'life0 self,
branch: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<PullRequest>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_prs<'life0, 'async_trait>(
&'life0 self,
filters: ListPullRequestFilters
) -> Pin<Box<dyn Future<Output = Result<Vec<PullRequest>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn approve_pr<'life0, 'async_trait>(
&'life0 self,
id: u32
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close_pr<'life0, 'async_trait>(
&'life0 self,
id: u32
) -> Pin<Box<dyn Future<Output = Result<PullRequest>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn merge_pr<'life0, 'async_trait>(
&'life0 self,
id: u32,
delete_source_branch: bool
) -> Pin<Box<dyn Future<Output = Result<PullRequest>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}