Skip to main content

Backend

Trait Backend 

Source
pub trait Backend: Send + Sync {
Show 19 methods // Provided methods fn emit_notice(&self, _notice: Notice) { ... } 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 find_previous_tag<'life0, 'life1, 'async_trait>( &'life0 self, _tag_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = WtgResult<Option<TagInfo>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn commits_between_tags<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _from_tag: &'life1 str, _to_tag: &'life2 str, _limit: usize, ) -> Pin<Box<dyn Future<Output = WtgResult<Vec<CommitInfo>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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, 'life2, 'async_trait>( &'life0 self, _commit_hash: &'life1 str, _commit_date: Option<DateTime<Utc>>, _filter: &'life2 ReleaseFilter, ) -> Pin<Box<dyn Future<Output = Option<TagInfo>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn fetch_release_body<'life0, 'life1, 'async_trait>( &'life0 self, _tag_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn changelog_for_version<'life0, 'life1, 'async_trait>( &'life0 self, _version: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<String>> + 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 release_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§

Source

fn emit_notice(&self, _notice: Notice)

Emit a notice to the registered callback. Used by resolution code to surface warnings to the user.

Source

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.

Source

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).

Source

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.).

Source

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).

Source

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.

Source

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.

Source

fn find_previous_tag<'life0, 'life1, 'async_trait>( &'life0 self, _tag_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = WtgResult<Option<TagInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find the previous tag before the given tag.

For semver tags, returns the immediately preceding version by semver ordering. For non-semver tags, returns the most recent tag pointing to an earlier commit.

Source

fn commits_between_tags<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _from_tag: &'life1 str, _to_tag: &'life2 str, _limit: usize, ) -> Pin<Box<dyn Future<Output = WtgResult<Vec<CommitInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get commits between two tags (from_tag exclusive, to_tag inclusive).

Returns up to limit commits, most recent first.

Source

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.

Source

fn find_release_for_commit<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _commit_hash: &'life1 str, _commit_date: Option<DateTime<Utc>>, _filter: &'life2 ReleaseFilter, ) -> Pin<Box<dyn Future<Output = Option<TagInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Find a release/tag that contains the given commit.

The filter parameter controls which tags are considered:

  • Unrestricted: All tags (default behavior)
  • SkipPrereleases: Filter out pre-release versions
  • Specific(tag): Check if the commit is in a specific tag
Source

fn fetch_release_body<'life0, 'life1, 'async_trait>( &'life0 self, _tag_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch the body/description of a GitHub release by tag name.

Source

fn changelog_for_version<'life0, 'life1, 'async_trait>( &'life0 self, _version: &'life1 str, ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Parse changelog for a specific version from repository root.

Returns the changelog section content for the given version, or None if not found. Backends implement this to access CHANGELOG.md via their native method (local filesystem or API).

Source

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.

Source

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.

Source

fn commit_url(&self, _hash: &str) -> Option<String>

Generate URL to view a commit.

Source

fn tag_url(&self, _tag: &str) -> Option<String>

Generate URL to view a tag (tree view for plain git tags).

Source

fn release_tag_url(&self, _tag: &str) -> Option<String>

Generate URL to view a release (releases page for tags with releases).

Source

fn author_url_from_email(&self, _email: &str) -> Option<String>

Generate author profile URL from email address.

Implementors§