pub trait Backend: Send + Sync {
Show 13 methods
// Provided methods
fn backend_for_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
_pr: &'life1 PullRequestInfo,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Backend>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn find_commit<'life0, 'life1, 'async_trait>(
&'life0 self,
_hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<CommitInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn enrich_commit<'life0, 'async_trait>(
&'life0 self,
commit: CommitInfo,
) -> Pin<Box<dyn Future<Output = CommitInfo> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn find_commit_for_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
pr: &'life1 PullRequestInfo,
) -> Pin<Box<dyn Future<Output = WtgResult<CommitInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn find_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_branch: &'life1 str,
_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = WtgResult<FileInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn find_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<TagInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn disambiguate_query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ParsedQuery,
) -> Pin<Box<dyn Future<Output = WtgResult<Query>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn find_release_for_commit<'life0, 'life1, 'async_trait>(
&'life0 self,
_commit_hash: &'life1 str,
_commit_date: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Option<TagInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn fetch_issue<'life0, 'async_trait>(
&'life0 self,
_number: u64,
) -> Pin<Box<dyn Future<Output = WtgResult<ExtendedIssueInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn fetch_pr<'life0, 'async_trait>(
&'life0 self,
_number: u64,
) -> Pin<Box<dyn Future<Output = WtgResult<PullRequestInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn commit_url(&self, _hash: &str) -> Option<String> { ... }
fn tag_url(&self, _tag: &str) -> Option<String> { ... }
fn author_url_from_email(&self, _email: &str) -> Option<String> { ... }
}Expand description
Unified backend trait for all git/GitHub operations.
Backends implement methods for operations they support. Default implementations
return WtgError::Unsupported for operations not available.
Provided Methods§
Sourcefn backend_for_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
_pr: &'life1 PullRequestInfo,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Backend>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn backend_for_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
_pr: &'life1 PullRequestInfo,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Backend>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a backend for fetching PR data if the PR is from a different repository. Returns None if same repo or cross-project not supported.
Sourcefn find_commit<'life0, 'life1, 'async_trait>(
&'life0 self,
_hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<CommitInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_commit<'life0, 'life1, 'async_trait>(
&'life0 self,
_hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<CommitInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find commit by hash (short or full).
Sourcefn enrich_commit<'life0, 'async_trait>(
&'life0 self,
commit: CommitInfo,
) -> Pin<Box<dyn Future<Output = CommitInfo> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn enrich_commit<'life0, 'async_trait>(
&'life0 self,
commit: CommitInfo,
) -> Pin<Box<dyn Future<Output = CommitInfo> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Enrich commit with additional info (author URLs, commit URL, etc.).
Sourcefn find_commit_for_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
pr: &'life1 PullRequestInfo,
) -> Pin<Box<dyn Future<Output = WtgResult<CommitInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_commit_for_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
pr: &'life1 PullRequestInfo,
) -> Pin<Box<dyn Future<Output = WtgResult<CommitInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find commit info from a PR (using merge commit SHA).
Sourcefn find_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_branch: &'life1 str,
_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = WtgResult<FileInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn find_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_branch: &'life1 str,
_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = WtgResult<FileInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Find file and its history in the repository.
Sourcefn find_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<TagInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<TagInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find a specific tag by name.
Sourcefn disambiguate_query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ParsedQuery,
) -> Pin<Box<dyn Future<Output = WtgResult<Query>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn disambiguate_query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ParsedQuery,
) -> Pin<Box<dyn Future<Output = WtgResult<Query>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Disambiguate a parsed query into a concrete query.
Sourcefn find_release_for_commit<'life0, 'life1, 'async_trait>(
&'life0 self,
_commit_hash: &'life1 str,
_commit_date: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Option<TagInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_release_for_commit<'life0, 'life1, 'async_trait>(
&'life0 self,
_commit_hash: &'life1 str,
_commit_date: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Option<TagInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find a release/tag that contains the given commit.
Sourcefn fetch_issue<'life0, 'async_trait>(
&'life0 self,
_number: u64,
) -> Pin<Box<dyn Future<Output = WtgResult<ExtendedIssueInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_issue<'life0, 'async_trait>(
&'life0 self,
_number: u64,
) -> Pin<Box<dyn Future<Output = WtgResult<ExtendedIssueInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch issue details including closing PRs.
Sourcefn fetch_pr<'life0, 'async_trait>(
&'life0 self,
_number: u64,
) -> Pin<Box<dyn Future<Output = WtgResult<PullRequestInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_pr<'life0, 'async_trait>(
&'life0 self,
_number: u64,
) -> Pin<Box<dyn Future<Output = WtgResult<PullRequestInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch PR details.
Sourcefn commit_url(&self, _hash: &str) -> Option<String>
fn commit_url(&self, _hash: &str) -> Option<String>
Generate URL to view a commit.
Generate author profile URL from email address.