pub trait MergeState: Send + Sync {
// Provided methods
fn is_pr_merged<'life0, 'life1, 'async_trait>(
&'life0 self,
_branch: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn batch_is_pr_merged<'life0, 'life1, 'async_trait>(
&'life0 self,
branches: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, bool>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn blocked_by<'life0, 'life1, 'async_trait>(
&'life0 self,
_repo: &'life1 str,
_issue_number: i64,
) -> Pin<Box<dyn Future<Output = Result<BlockedByFetch>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn issue_close_state<'life0, 'life1, 'async_trait>(
&'life0 self,
_repo: &'life1 str,
_issue_number: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<(String, Option<String>)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn pull_request_completion<'life0, 'life1, 'async_trait>(
&'life0 self,
_repo: &'life1 str,
_pr_number: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<PullRequestCompletion>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn add_dependency<'life0, 'life1, 'async_trait>(
&'life0 self,
_issue_number: i64,
_blocking_repo: &'life1 str,
_blocking_number: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Pull request and dependency state
Provided Methods§
Sourcefn is_pr_merged<'life0, 'life1, 'async_trait>(
&'life0 self,
_branch: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_pr_merged<'life0, 'life1, 'async_trait>(
&'life0 self,
_branch: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a PR/merge request for the given branch has been merged.
Returns false by default (backends that don’t track PRs).
Sourcefn batch_is_pr_merged<'life0, 'life1, 'async_trait>(
&'life0 self,
branches: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, bool>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn batch_is_pr_merged<'life0, 'life1, 'async_trait>(
&'life0 self,
branches: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, bool>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if PRs for the given branches have been merged, in a single batch.
Returns a map of branch → merged. Backends that support batch queries
(e.g. via GraphQL) should override this; the default falls back to
serial is_pr_merged calls.
Sourcefn blocked_by<'life0, 'life1, 'async_trait>(
&'life0 self,
_repo: &'life1 str,
_issue_number: i64,
) -> Pin<Box<dyn Future<Output = Result<BlockedByFetch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn blocked_by<'life0, 'life1, 'async_trait>(
&'life0 self,
_repo: &'life1 str,
_issue_number: i64,
) -> Pin<Box<dyn Future<Output = Result<BlockedByFetch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Native blocked-by issues for issue_number in repo.
Default is Unavailable, an empty native list. A 200 with an empty list
is Native, not this default
Sourcefn issue_close_state<'life0, 'life1, 'async_trait>(
&'life0 self,
_repo: &'life1 str,
_issue_number: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<(String, Option<String>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn issue_close_state<'life0, 'life1, 'async_trait>(
&'life0 self,
_repo: &'life1 str,
_issue_number: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<(String, Option<String>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Close state of an issue orch may not track.
Ok(None) means unknown. Callers treat unknown as still open
Sourcefn pull_request_completion<'life0, 'life1, 'async_trait>(
&'life0 self,
_repo: &'life1 str,
_pr_number: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<PullRequestCompletion>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pull_request_completion<'life0, 'life1, 'async_trait>(
&'life0 self,
_repo: &'life1 str,
_pr_number: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<PullRequestCompletion>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Review and merge state of pull request pr_number in repo.
Ok(None) means the pull request does not exist. Callers that already
know a PR number treat that as not merged
Sourcefn add_dependency<'life0, 'life1, 'async_trait>(
&'life0 self,
_issue_number: i64,
_blocking_repo: &'life1 str,
_blocking_number: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_dependency<'life0, 'life1, 'async_trait>(
&'life0 self,
_issue_number: i64,
_blocking_repo: &'life1 str,
_blocking_number: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record that issue_number in this backend’s repo is blocked by another issue.
The blocking issue is named by repository and number. The write uses that issue’s database id, which is valid across repositories
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".