pub struct GitHub { /* private fields */ }Expand description
GitHub CLI operations wrapper.
This struct provides a clean API for GitHub CLI operations.
Implementations§
Source§impl GitHub
impl GitHub
Sourcepub fn pr_status(&self, branch: &str) -> Result<Option<PrStatus>>
pub fn pr_status(&self, branch: &str) -> Result<Option<PrStatus>>
Get PR status for a branch.
Returns None if no PR exists for the branch.
§Arguments
branch- The branch name to check
§Errors
Returns an error if the gh command fails for reasons other than no PR existing.
§Example
use gba_core::git::{GitHub, PrStatus};
let gh = GitHub::new(".");
if let Some(status) = gh.pr_status("feature/my-branch")? {
println!("PR status: {:?}", status);
} else {
println!("No PR for this branch");
}Trait Implementations§
Auto Trait Implementations§
impl Freeze for GitHub
impl RefUnwindSafe for GitHub
impl Send for GitHub
impl Sync for GitHub
impl Unpin for GitHub
impl UnwindSafe for GitHub
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