Skip to main content

Forge

Trait Forge 

Source
pub trait Forge: Send + Sync {
Show 24 methods // Required method fn me(&self) -> BoxFuture<'_, Result<Identity>>; // Provided methods fn create_pr<'a>( &'a self, _repo: &'a RepoRef, _pr: &'a PullRequestDraft, ) -> BoxFuture<'a, Result<PullRequest>> { ... } fn pull_request<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<PullRequest>> { ... } fn pull_requests_of_branch<'a>( &'a self, _repo: &'a RepoRef, _branch: &'a str, ) -> BoxFuture<'a, Result<Vec<PullRequest>>> { ... } fn parent<'a>( &'a self, _repo: &'a RepoRef, ) -> BoxFuture<'a, Result<Option<RepoRef>>> { ... } fn open_pull_requests<'a>( &'a self, _repo: &'a RepoRef, ) -> BoxFuture<'a, Result<Vec<PullRequest>>> { ... } fn pull_requests<'a>( &'a self, _repo: &'a RepoRef, _numbers: &'a [u64], ) -> BoxFuture<'a, Result<Vec<PullRequest>>> { ... } fn merge<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _strategy: MergeStrategy, ) -> BoxFuture<'a, Result<()>> { ... } fn merge_options<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<MergeOptions>> { ... } fn auto_merge<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _strategy: MergeStrategy, ) -> BoxFuture<'a, Result<()>> { ... } fn checks<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<Vec<Check>>> { ... } fn job_log<'a>( &'a self, _repo: &'a RepoRef, _job: &'a str, ) -> BoxFuture<'a, Result<String>> { ... } fn reviews<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<Vec<Review>>> { ... } fn comments<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<Vec<ReviewComment>>> { ... } fn comment<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _body: &'a str, ) -> BoxFuture<'a, Result<()>> { ... } fn rerun_failed<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<usize>> { ... } fn branch_checks<'a>( &'a self, _repo: &'a RepoRef, _branch: &'a str, ) -> BoxFuture<'a, Result<Vec<Check>>> { ... } fn rerun_failed_of_branch<'a>( &'a self, _repo: &'a RepoRef, _branch: &'a str, ) -> BoxFuture<'a, Result<usize>> { ... } fn review<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _review: &'a ReviewDraft, ) -> BoxFuture<'a, Result<()>> { ... } fn reply<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _comment: &'a str, _body: &'a str, ) -> BoxFuture<'a, Result<()>> { ... } fn resolve<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _comment: &'a str, ) -> BoxFuture<'a, Result<()>> { ... } fn rate_limit(&self) -> Option<RateLimit> { ... } fn deployments<'a>( &'a self, _repo: &'a RepoRef, _git_ref: &'a str, ) -> BoxFuture<'a, Result<Vec<Deployment>>> { ... } fn environments<'a>( &'a self, _repo: &'a RepoRef, ) -> BoxFuture<'a, Result<Vec<Deployment>>> { ... }
}
Expand description

A client of one host for one account. Its provider’s Capabilities say which calls it answers; the others say Unsupported.

Required Methods§

Source

fn me(&self) -> BoxFuture<'_, Result<Identity>>

Who the token is, and its rights when the host tells them.

Provided Methods§

Source

fn create_pr<'a>( &'a self, _repo: &'a RepoRef, _pr: &'a PullRequestDraft, ) -> BoxFuture<'a, Result<PullRequest>>

Source

fn pull_request<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<PullRequest>>

Source

fn pull_requests_of_branch<'a>( &'a self, _repo: &'a RepoRef, _branch: &'a str, ) -> BoxFuture<'a, Result<Vec<PullRequest>>>

The pull requests (open, merged or closed) whose branch is branch, newest first.

Source

fn parent<'a>( &'a self, _repo: &'a RepoRef, ) -> BoxFuture<'a, Result<Option<RepoRef>>>

The repository repo was forked from; none when it is no fork, or the host does not say.

Source

fn open_pull_requests<'a>( &'a self, _repo: &'a RepoRef, ) -> BoxFuture<'a, Result<Vec<PullRequest>>>

The open pull requests of a repository, the most recently updated first (OPEN_PRS at most).

Source

fn pull_requests<'a>( &'a self, _repo: &'a RepoRef, _numbers: &'a [u64], ) -> BoxFuture<'a, Result<Vec<PullRequest>>>

Several pull requests of a repository, in as few calls as the host allows.

Source

fn merge<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _strategy: MergeStrategy, ) -> BoxFuture<'a, Result<()>>

Source

fn merge_options<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<MergeOptions>>

How the pull request number may merge, as the repository’s settings say: the strategies they allow, and whether the host’s auto-merge is there for it. Unsupported: the core takes its provider’s Capabilities.

Source

fn auto_merge<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _strategy: MergeStrategy, ) -> BoxFuture<'a, Result<()>>

Merge once the checks pass.

Source

fn checks<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<Vec<Check>>>

Source

fn job_log<'a>( &'a self, _repo: &'a RepoRef, _job: &'a str, ) -> BoxFuture<'a, Result<String>>

Source

fn reviews<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<Vec<Review>>>

Source

fn comments<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<Vec<ReviewComment>>>

Source

fn comment<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _body: &'a str, ) -> BoxFuture<'a, Result<()>>

Source

fn rerun_failed<'a>( &'a self, _repo: &'a RepoRef, _number: u64, ) -> BoxFuture<'a, Result<usize>>

Run the failed jobs of a pull request’s last commit again; how many runs started.

Source

fn branch_checks<'a>( &'a self, _repo: &'a RepoRef, _branch: &'a str, ) -> BoxFuture<'a, Result<Vec<Check>>>

The checks of the last commit of a branch (the target, a branch pushed without a pull request), as checks gives a pull request’s (ESC-63).

Source

fn rerun_failed_of_branch<'a>( &'a self, _repo: &'a RepoRef, _branch: &'a str, ) -> BoxFuture<'a, Result<usize>>

Run the failed jobs of the last commit of a branch again; how many runs started (ESC-63).

Source

fn review<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _review: &'a ReviewDraft, ) -> BoxFuture<'a, Result<()>>

Publish a review the user validated.

Source

fn reply<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _comment: &'a str, _body: &'a str, ) -> BoxFuture<'a, Result<()>>

Answer under a comment of a line (ReviewComment::id).

Source

fn resolve<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _comment: &'a str, ) -> BoxFuture<'a, Result<()>>

Resolves the thread of a comment of a line (ReviewComment::id).

Source

fn rate_limit(&self) -> Option<RateLimit>

What the host’s last answer said of its limit, when it says it.

Source

fn deployments<'a>( &'a self, _repo: &'a RepoRef, _git_ref: &'a str, ) -> BoxFuture<'a, Result<Vec<Deployment>>>

Source

fn environments<'a>( &'a self, _repo: &'a RepoRef, ) -> BoxFuture<'a, Result<Vec<Deployment>>>

The recent deployments of the repository, whatever their branch, newest first (ESC-67): of each environment at least its newest one and its newest one that succeeded (what runs there), with their commit, their date, their author and their job.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§