pub struct RealGh;Expand description
The production GhClient that spawns the real gh binary.
Trait Implementations§
impl Copy for RealGh
Source§impl GhClient for RealGh
impl GhClient for RealGh
Source§fn list_open_prs(&self, dir: &Path) -> Result<Vec<PrSummary>>
fn list_open_prs(&self, dir: &Path) -> Result<Vec<PrSummary>>
Lists open PRs for the repository at
dir.Source§fn view_pr(&self, dir: &Path, target: &str) -> Result<PrView>
fn view_pr(&self, dir: &Path, target: &str) -> Result<PrView>
Views the PR identified by
target (a number, URL, or head branch).Source§fn default_branch(&self, dir: &Path) -> Result<Option<String>>
fn default_branch(&self, dir: &Path) -> Result<Option<String>>
The repository’s default branch (
gh repo view --json defaultBranchRef),
or None on any failure (kept non-fatal so trunk detection can fall back
to local git state offline).Source§fn find_pr_for_branch(&self, dir: &Path, branch: &str) -> Result<Option<OpenPr>>
fn find_pr_for_branch(&self, dir: &Path, branch: &str) -> Result<Option<OpenPr>>
The open PR whose head is
branch, if any.Source§fn create_pr(&self, dir: &Path, args: &[String]) -> Result<String>
fn create_pr(&self, dir: &Path, args: &[String]) -> Result<String>
Runs
gh pr create with the prebuilt args, returning stdout (the URL
line is parsed by the caller). Args are typically built by
sendit::build_create_args.Auto Trait Implementations§
impl Freeze for RealGh
impl RefUnwindSafe for RealGh
impl Send for RealGh
impl Sync for RealGh
impl Unpin for RealGh
impl UnsafeUnpin for RealGh
impl UnwindSafe for RealGh
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more