pub struct Forge<R: ProcessRunner = JobRunner> { /* private fields */ }Expand description
Implementations§
Source§impl Forge<JobRunner>
impl Forge<JobRunner>
Source§impl<R: ProcessRunner> Forge<R>
impl<R: ProcessRunner> Forge<R>
Sourcepub fn for_github(cwd: impl Into<PathBuf>, client: GitHub<R>) -> Self
pub fn for_github(cwd: impl Into<PathBuf>, client: GitHub<R>) -> Self
Build a GitHub-backed handle from an explicit client — for a custom runner
(e.g. a test seam) or a pre-configured GitHub.
Sourcepub fn for_gitlab(cwd: impl Into<PathBuf>, client: GitLab<R>) -> Self
pub fn for_gitlab(cwd: impl Into<PathBuf>, client: GitLab<R>) -> Self
Build a GitLab-backed handle from an explicit GitLab client.
Sourcepub fn for_gitea(cwd: impl Into<PathBuf>, client: Gitea<R>) -> Self
pub fn for_gitea(cwd: impl Into<PathBuf>, client: Gitea<R>) -> Self
Build a Gitea-backed handle from an explicit Gitea client.
Sourcepub fn at(&self, dir: impl Into<PathBuf>) -> Self
pub fn at(&self, dir: impl Into<PathBuf>) -> Self
A sibling handle bound to dir, sharing this handle’s client.
Sourcepub async fn auth_status(&self) -> Result<bool>
pub async fn auth_status(&self) -> Result<bool>
Whether the user is authenticated (GitHub/GitLab: a zero-exit auth status; Gitea: at least one configured login).
Sourcepub async fn repo_view(&self) -> Result<ForgeRepo>
pub async fn repo_view(&self) -> Result<ForgeRepo>
The repository/project for the bound directory. Unsupported
on Gitea (tea has no current-repo view).
Sourcepub async fn pr_list(&self) -> Result<Vec<ForgePr>>
pub async fn pr_list(&self) -> Result<Vec<ForgePr>>
Open pull/merge requests for the bound directory.
Sourcepub async fn pr_view(&self, number: u64) -> Result<ForgePr>
pub async fn pr_view(&self, number: u64) -> Result<ForgePr>
A single PR/MR by number (GitLab iid). On Gitea this lists and filters
(tea has no single-PR view).
Sourcepub async fn pr_create(&self, spec: PrCreate) -> Result<String>
pub async fn pr_create(&self, spec: PrCreate) -> Result<String>
Open a PR/MR (see PrCreate), returning the CLI’s success output — a
URL on GitHub/GitLab; tea prints a textual summary (no URL).
Sourcepub async fn pr_merge(&self, number: u64, strategy: MergeStrategy) -> Result<()>
pub async fn pr_merge(&self, number: u64, strategy: MergeStrategy) -> Result<()>
Merge a PR/MR with the given MergeStrategy.
Sourcepub async fn pr_mark_ready(&self, number: u64) -> Result<()>
pub async fn pr_mark_ready(&self, number: u64) -> Result<()>
Mark a draft PR/MR as ready for review. Unsupported
on Gitea (tea has no draft toggle — a Gitea draft is a WIP: title
prefix, edited via the raw client).
Sourcepub async fn pr_close(&self, number: u64, delete_branch: bool) -> Result<()>
pub async fn pr_close(&self, number: u64, delete_branch: bool) -> Result<()>
Close a PR/MR without merging. delete_branch applies to GitHub only
(gh pr close --delete-branch); GitLab and Gitea ignore it.
Sourcepub async fn pr_checks(&self, number: u64) -> Result<CiStatus>
pub async fn pr_checks(&self, number: u64) -> Result<CiStatus>
The PR/MR’s coarse CI status (see CiStatus). Unsupported
on Gitea (tea has no checks command).
Sourcepub async fn issue_list(&self) -> Result<Vec<ForgeIssue>>
pub async fn issue_list(&self) -> Result<Vec<ForgeIssue>>
Open issues for the bound directory (up to 100; drop to the underlying client for more).
Sourcepub async fn issue_view(&self, number: u64) -> Result<ForgeIssue>
pub async fn issue_view(&self, number: u64) -> Result<ForgeIssue>
A single issue by number (GitLab iid), with body/url filled.
Sourcepub async fn issue_create(&self, title: &str, body: &str) -> Result<String>
pub async fn issue_create(&self, title: &str, body: &str) -> Result<String>
Open an issue, returning the CLI’s success output — a URL on
GitHub/GitLab; tea prints a textual summary whose final line is the
URL. (The same honest-output contract as pr_create.)
Sourcepub async fn release_list(&self) -> Result<Vec<ForgeRelease>>
pub async fn release_list(&self) -> Result<Vec<ForgeRelease>>
Releases for the bound directory, newest first (up to 100; drop to the underlying client for more).
Sourcepub async fn release_view(&self, tag: &str) -> Result<ForgeRelease>
pub async fn release_view(&self, tag: &str) -> Result<ForgeRelease>
A single release by tag. Unsupported on Gitea
(tea releases always lists — it has no single-release view; filter
release_list instead).
Trait Implementations§
Source§impl<R: ProcessRunner> ForgeApi for Forge<R>
impl<R: ProcessRunner> ForgeApi for Forge<R>
Source§fn auth_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn auth_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::auth_status.Source§fn repo_view<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ForgeRepo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn repo_view<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ForgeRepo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::repo_view.Source§fn pr_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ForgePr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pr_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ForgePr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::pr_list.Source§fn pr_view<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<ForgePr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pr_view<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<ForgePr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::pr_view.Source§fn pr_create<'life0, 'async_trait>(
&'life0 self,
spec: PrCreate,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pr_create<'life0, 'async_trait>(
&'life0 self,
spec: PrCreate,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::pr_create.Source§fn pr_merge<'life0, 'async_trait>(
&'life0 self,
number: u64,
strategy: MergeStrategy,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pr_merge<'life0, 'async_trait>(
&'life0 self,
number: u64,
strategy: MergeStrategy,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::pr_merge.Source§fn pr_mark_ready<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pr_mark_ready<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::pr_mark_ready.Source§fn pr_close<'life0, 'async_trait>(
&'life0 self,
number: u64,
delete_branch: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pr_close<'life0, 'async_trait>(
&'life0 self,
number: u64,
delete_branch: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::pr_close.Source§fn pr_checks<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<CiStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pr_checks<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<CiStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::pr_checks.Source§fn issue_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ForgeIssue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn issue_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ForgeIssue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::issue_list.Source§fn issue_view<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<ForgeIssue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn issue_view<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<ForgeIssue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::issue_view.Source§fn issue_create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
title: &'life1 str,
body: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn issue_create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
title: &'life1 str,
body: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Forge::issue_create.Source§fn release_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ForgeRelease>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn release_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ForgeRelease>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Forge::release_list.Source§fn release_view<'life0, 'life1, 'async_trait>(
&'life0 self,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ForgeRelease>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn release_view<'life0, 'life1, 'async_trait>(
&'life0 self,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ForgeRelease>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Forge::release_view.