pub trait PrProvider:
Debug
+ Send
+ Sync {
Show 14 methods
// Required methods
fn create<'life0, 'async_trait>(
&'life0 self,
args: CreatePrArgs,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
args: ListPrArgs,
) -> Pin<Box<dyn Future<Output = Result<Paged<PrData>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn view<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reopen<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn comment<'life0, 'life1, 'async_trait>(
&'life0 self,
number: u64,
body: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<CommentData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn merge<'life0, 'async_trait>(
&'life0 self,
number: u64,
strategy: Option<MergeStrategy>,
auto: bool,
) -> Pin<Box<dyn Future<Output = Result<MergeResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn checkout<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn mark_ready<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn mark_wip<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_branch<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn diff<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn patch<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn default_branch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Required Methods§
Sourcefn create<'life0, 'async_trait>(
&'life0 self,
args: CreatePrArgs,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
args: CreatePrArgs,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn list<'life0, 'async_trait>(
&'life0 self,
args: ListPrArgs,
) -> Pin<Box<dyn Future<Output = Result<Paged<PrData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
args: ListPrArgs,
) -> Pin<Box<dyn Future<Output = Result<Paged<PrData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn view<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn view<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn close<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn reopen<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reopen<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn comment<'life0, 'life1, 'async_trait>(
&'life0 self,
number: u64,
body: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<CommentData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn comment<'life0, 'life1, 'async_trait>(
&'life0 self,
number: u64,
body: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<CommentData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn merge<'life0, 'async_trait>(
&'life0 self,
number: u64,
strategy: Option<MergeStrategy>,
auto: bool,
) -> Pin<Box<dyn Future<Output = Result<MergeResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn merge<'life0, 'async_trait>(
&'life0 self,
number: u64,
strategy: Option<MergeStrategy>,
auto: bool,
) -> Pin<Box<dyn Future<Output = Result<MergeResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
合并指定编号的 PR,返回合并结果。
strategy 指定合并策略(merge/squash/rebase)。
未指定时使用平台默认策略。
auto 为 true 时排队合并:满足条件即由平台自动完成合并,
调用方不必等待 CI。GitHub 与 GitLab 原生支持;GitCode 不支持,
传 true 会返回 [CoreError::Platform](与 PipelineProvider 的处理一致)。
§Errors
当 PR 不存在、无法合并、平台不支持 auto 或平台 API 调用失败时返回错误。
Sourcefn checkout<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn checkout<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn mark_ready<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_ready<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn mark_wip<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_wip<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<PrData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn sync_branch<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync_branch<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn diff<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn diff<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn patch<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn patch<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn default_branch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn default_branch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
查询仓库配置的默认分支(如 main、dev)。
用于 pr create 在未显式指定 --base 时探测目标分支,避免硬编码
"main" 导致默认分支非 main 的仓库创建出目标错误的 PR/MR。
§Errors
当平台 API 调用失败或平台不支持该查询(如 GitCode)时返回错误。
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".