pub trait PullRequestSource: Send + Sync {
Show 17 methods
// Required methods
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 PullRequestQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<PullRequest>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<PullRequest>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn threads<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<CommentThread>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn changes<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileChange>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_comment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
body: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn vote<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
vote: ReviewVote,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn merge<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
options: &'life2 MergeOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn current_user<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn timeline<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<TimelineEvent>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn checks<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckRun>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn commits<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<Commit>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn list_omits_decoration(&self) -> bool { ... }
fn decorate<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<PrDecoration>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn commit_changes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
_sha: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileChange>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn reply_to_thread<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
_thread_id: &'life2 str,
body: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn revert<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn submit_review<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
_event: ReviewVote,
_comments: &'life2 [LineComment],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Pull requests from one connection. Every method that names a single pull request takes an
ItemRef, not a bare id: on a connection spanning several repositories the id alone does
not say which #7 is meant, and guessing silently opens, merges or comments on the wrong
one. The repo on the ref is connection-relative.
Required Methods§
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 PullRequestQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<PullRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<PullRequest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn threads<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<CommentThread>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn changes<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileChange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_comment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
body: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn vote<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
vote: ReviewVote,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn merge<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
options: &'life2 MergeOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Provided Methods§
Sourcefn current_user<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn current_user<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The handle identifying the signed-in user on this connection — the same identity
list resolves internally when it is asked for Mine or ReviewRequested.
Exposed so a caller can fetch one unfiltered pool and derive those views itself, rather
than issuing a list per filter that re-fetches identical rows. It is matched against a
user’s handle, display name or id by
apply_pull_request_filter.
None — the default, and what a provider returns when it cannot establish an identity —
makes that filter pass everything through rather than silently emptying the list. A caller
deriving views locally must treat it as “cannot filter”, not as “nothing matches”: showing
an unfiltered list under a “Mine” heading is wrong, but quietly showing none of your pull
requests is worse, and matches what list already does in the same situation.
Sourcefn timeline<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<TimelineEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn timeline<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<TimelineEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The event timeline (reviews/approvals, merges, state changes, …), oldest → newest. Defaults to empty for providers without a timeline/activity API.
Sourcefn checks<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckRun>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn checks<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckRun>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Individual named CI checks. Defaults to empty for providers that don’t expose them.
Sourcefn commits<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<Commit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn commits<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<Commit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Commits on the pull request. Defaults to empty.
Sourcefn list_omits_decoration(&self) -> bool
fn list_omits_decoration(&self) -> bool
Whether this provider’s list endpoint leaves the decorated fields out, so a caller that skipped decoration has to fetch them per row to show them.
false by default, and that is the right answer for most providers: GitLab, Azure DevOps
and Bitbucket fill everything they have straight from the list payload, so asking them for
decoration is a call per row that returns what the caller already had. GitHub is the
exception — /pulls omits mergeable_state, changed_files, additions and deletions
entirely — and overrides this.
Sourcefn decorate<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<PrDecoration>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn decorate<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<PrDecoration>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The fields the list endpoint omits, for one pull request. Defaults to projecting them out
of a full get — providers with a cheaper route override it.
Sourcefn commit_changes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
_sha: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileChange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn commit_changes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
_sha: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileChange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Files changed by a single commit on the pull request (with inline patches where the provider supplies them). Defaults to unsupported (empty).
Sourcefn reply_to_thread<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
_thread_id: &'life2 str,
body: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn reply_to_thread<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
item: &'life1 ItemRef,
_thread_id: &'life2 str,
body: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Replies to an existing comment thread (returned by threads), so you can
answer someone else’s comment in-thread rather than starting a new top-level one. Defaults
to posting a plain top-level comment — providers whose threads are really flat (e.g. a
GitHub PR conversation, which has no reply API) keep that behaviour; providers with real
threads (Azure, GitLab discussions, Bitbucket, GitHub review threads) override it.
Sourcefn revert<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn revert<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reverts a merged pull request (undoes its merge commit on the target branch). Defaults to unsupported — only providers with a revert API (GitLab, Azure DevOps) override this.
Sourcefn submit_review<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
_event: ReviewVote,
_comments: &'life2 [LineComment],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn submit_review<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_item: &'life1 ItemRef,
_event: ReviewVote,
_comments: &'life2 [LineComment],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Submits a review with inline line comments. event maps to approve /
request-changes / plain comment. Defaults to unsupported.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".