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§
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>>
Sourcefn pull_requests_of_branch<'a>(
&'a self,
_repo: &'a RepoRef,
_branch: &'a str,
) -> BoxFuture<'a, Result<Vec<PullRequest>>>
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.
Sourcefn parent<'a>(
&'a self,
_repo: &'a RepoRef,
) -> BoxFuture<'a, Result<Option<RepoRef>>>
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.
Sourcefn open_pull_requests<'a>(
&'a self,
_repo: &'a RepoRef,
) -> BoxFuture<'a, Result<Vec<PullRequest>>>
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).
Sourcefn pull_requests<'a>(
&'a self,
_repo: &'a RepoRef,
_numbers: &'a [u64],
) -> BoxFuture<'a, Result<Vec<PullRequest>>>
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.
fn merge<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _strategy: MergeStrategy, ) -> BoxFuture<'a, Result<()>>
Sourcefn merge_options<'a>(
&'a self,
_repo: &'a RepoRef,
_number: u64,
) -> BoxFuture<'a, Result<MergeOptions>>
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.
Sourcefn auto_merge<'a>(
&'a self,
_repo: &'a RepoRef,
_number: u64,
_strategy: MergeStrategy,
) -> BoxFuture<'a, Result<()>>
fn auto_merge<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _strategy: MergeStrategy, ) -> BoxFuture<'a, Result<()>>
Merge once the checks pass.
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<()>>
Sourcefn rerun_failed<'a>(
&'a self,
_repo: &'a RepoRef,
_number: u64,
) -> BoxFuture<'a, Result<usize>>
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.
Sourcefn branch_checks<'a>(
&'a self,
_repo: &'a RepoRef,
_branch: &'a str,
) -> BoxFuture<'a, Result<Vec<Check>>>
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).
Sourcefn rerun_failed_of_branch<'a>(
&'a self,
_repo: &'a RepoRef,
_branch: &'a str,
) -> BoxFuture<'a, Result<usize>>
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).
Sourcefn review<'a>(
&'a self,
_repo: &'a RepoRef,
_number: u64,
_review: &'a ReviewDraft,
) -> BoxFuture<'a, Result<()>>
fn review<'a>( &'a self, _repo: &'a RepoRef, _number: u64, _review: &'a ReviewDraft, ) -> BoxFuture<'a, Result<()>>
Publish a review the user validated.
Sourcefn reply<'a>(
&'a self,
_repo: &'a RepoRef,
_number: u64,
_comment: &'a str,
_body: &'a str,
) -> BoxFuture<'a, Result<()>>
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).
Sourcefn resolve<'a>(
&'a self,
_repo: &'a RepoRef,
_number: u64,
_comment: &'a str,
) -> BoxFuture<'a, Result<()>>
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).
Sourcefn rate_limit(&self) -> Option<RateLimit>
fn rate_limit(&self) -> Option<RateLimit>
What the host’s last answer said of its limit, when it says it.
fn deployments<'a>( &'a self, _repo: &'a RepoRef, _git_ref: &'a str, ) -> BoxFuture<'a, Result<Vec<Deployment>>>
Sourcefn environments<'a>(
&'a self,
_repo: &'a RepoRef,
) -> BoxFuture<'a, Result<Vec<Deployment>>>
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".