pub struct GitHubProvider { /* private fields */ }Expand description
GitHub implementation of the VcsProvider trait using the GitHub REST API.
Implementations§
Source§impl GitHubProvider
impl GitHubProvider
Sourcepub fn get_pr_for_branch(
&self,
branch: &str,
) -> Result<PrMetadata, ReleaseError>
pub fn get_pr_for_branch( &self, branch: &str, ) -> Result<PrMetadata, ReleaseError>
Find the open PR number for a given branch.
Sourcepub fn get_pr_diff(&self, pr_number: u64) -> Result<String, ReleaseError>
pub fn get_pr_diff(&self, pr_number: u64) -> Result<String, ReleaseError>
Fetch the diff for a PR.
Sourcepub fn count_open_prs(&self) -> Result<(usize, usize), ReleaseError>
pub fn count_open_prs(&self) -> Result<(usize, usize), ReleaseError>
Count open PRs.
Sourcepub fn post_pr_review(
&self,
pr_number: u64,
body: &str,
) -> Result<(), ReleaseError>
pub fn post_pr_review( &self, pr_number: u64, body: &str, ) -> Result<(), ReleaseError>
Post a review summary on a PR.
Trait Implementations§
Source§impl VcsProvider for GitHubProvider
impl VcsProvider for GitHubProvider
Source§fn create_release(
&self,
tag: &str,
name: &str,
body: &str,
prerelease: bool,
draft: bool,
) -> Result<String, ReleaseError>
fn create_release( &self, tag: &str, name: &str, body: &str, prerelease: bool, draft: bool, ) -> Result<String, ReleaseError>
Create a release on the remote VCS.
Source§fn compare_url(&self, base: &str, head: &str) -> Result<String, ReleaseError>
fn compare_url(&self, base: &str, head: &str) -> Result<String, ReleaseError>
Generate a compare URL between two refs.
Source§fn release_exists(&self, tag: &str) -> Result<bool, ReleaseError>
fn release_exists(&self, tag: &str) -> Result<bool, ReleaseError>
Check if a release already exists for the given tag.
Source§fn repo_url(&self) -> Option<String>
fn repo_url(&self) -> Option<String>
Return the base URL of the repository (e.g.
https://github.com/owner/repo).Source§fn delete_release(&self, tag: &str) -> Result<(), ReleaseError>
fn delete_release(&self, tag: &str) -> Result<(), ReleaseError>
Delete a release by tag.
Source§fn update_release(
&self,
tag: &str,
name: &str,
body: &str,
prerelease: bool,
draft: bool,
) -> Result<String, ReleaseError>
fn update_release( &self, tag: &str, name: &str, body: &str, prerelease: bool, draft: bool, ) -> Result<String, ReleaseError>
Update an existing release (name and body) using PATCH semantics,
preserving any previously uploaded assets.
Source§fn upload_assets(&self, tag: &str, files: &[&str]) -> Result<(), ReleaseError>
fn upload_assets(&self, tag: &str, files: &[&str]) -> Result<(), ReleaseError>
Upload asset files to an existing release identified by tag.
Source§fn verify_release(&self, tag: &str) -> Result<(), ReleaseError>
fn verify_release(&self, tag: &str) -> Result<(), ReleaseError>
Verify that a release exists and is in the expected state after creation.
Auto Trait Implementations§
impl Freeze for GitHubProvider
impl RefUnwindSafe for GitHubProvider
impl Send for GitHubProvider
impl Sync for GitHubProvider
impl Unpin for GitHubProvider
impl UnsafeUnpin for GitHubProvider
impl UnwindSafe for GitHubProvider
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