pub struct GitHubClient<E: CommandExecutor = RealCommandExecutor> { /* private fields */ }Expand description
GitHub client for interacting with GitHub via gh CLI
Implementations§
Source§impl<E: CommandExecutor> GitHubClient<E>
impl<E: CommandExecutor> GitHubClient<E>
Sourcepub fn with_executor(executor: E) -> Self
pub fn with_executor(executor: E) -> Self
Create a GitHubClient with a custom command executor (for testing)
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Check if gh CLI is available
Sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Check if gh is authenticated
Sourcepub fn get_pr_for_branch(&self, branch: &str) -> Result<Option<PrInfo>>
pub fn get_pr_for_branch(&self, branch: &str) -> Result<Option<PrInfo>>
Get PR information for a branch
Returns None if no PR exists for this branch.
Sourcepub fn delete_remote_branch(&self, branch: &str) -> Result<()>
pub fn delete_remote_branch(&self, branch: &str) -> Result<()>
Delete a remote branch
Trait Implementations§
Source§impl Default for GitHubClient<RealCommandExecutor>
impl Default for GitHubClient<RealCommandExecutor>
Auto Trait Implementations§
impl<E> Freeze for GitHubClient<E>where
E: Freeze,
impl<E> RefUnwindSafe for GitHubClient<E>where
E: RefUnwindSafe,
impl<E> Send for GitHubClient<E>
impl<E> Sync for GitHubClient<E>
impl<E> Unpin for GitHubClient<E>where
E: Unpin,
impl<E> UnwindSafe for GitHubClient<E>where
E: UnwindSafe,
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