pub struct GithubApiConnection {
pub client: ClientWithMiddleware,
pub api_url: Url,
}Fields§
§client: ClientWithMiddleware§api_url: UrlImplementations§
Source§impl GithubApiConnection
impl GithubApiConnection
pub async fn create_check_run( &self, head_sha: &Oid, name: &str, repository_id: &str, status: RequestableCheckStatusState, conclusion: CheckConclusionState, details_url: &Url, ) -> Result<String>
Source§impl GithubApiConnection
impl GithubApiConnection
Sourcepub async fn find_pull_request_by_head(
&self,
owner: &str,
name: &str,
head_ref_name: &str,
) -> Result<Option<(String, i64, bool)>>
pub async fn find_pull_request_by_head( &self, owner: &str, name: &str, head_ref_name: &str, ) -> Result<Option<(String, i64, bool)>>
Find an open PR by head branch name. Returns (node_id, number, is_draft) if found.
Sourcepub async fn update_pull_request(
&self,
pull_request_id: &str,
title: Option<&str>,
body: Option<&str>,
base_ref_name: Option<&str>,
) -> Result<(String, i64)>
pub async fn update_pull_request( &self, pull_request_id: &str, title: Option<&str>, body: Option<&str>, base_ref_name: Option<&str>, ) -> Result<(String, i64)>
Update an existing PR’s title, body, and/or base branch.
pub async fn convert_pull_request_to_draft( &self, pull_request_id: &str, ) -> Result<(String, i64, bool)>
pub async fn mark_pull_request_ready_for_review( &self, pull_request_id: &str, ) -> Result<(String, i64, bool)>
pub async fn create_pull_request( &self, repository_id: &str, base_branch: &str, head_branch: &str, title: &str, body: &str, draft: bool, ) -> Result<(String, i64)>
pub async fn close_pull_request(&self, pull_request_node_id: &str) -> Result<()>
Source§impl GithubApiConnection
impl GithubApiConnection
Sourcepub async fn get_default_branch(
&self,
owner: &str,
name: &str,
) -> Result<Option<(String, String)>>
pub async fn get_default_branch( &self, owner: &str, name: &str, ) -> Result<Option<(String, String)>>
Returns (default_branch_name, default_branch_head_oid) if available.
Sourcepub async fn get_repository_rulesets(
&self,
owner: &str,
name: &str,
) -> Result<Vec<RepositoryRuleset>>
pub async fn get_repository_rulesets( &self, owner: &str, name: &str, ) -> Result<Vec<RepositoryRuleset>>
Returns all rulesets for the given repository with their branch conditions.
Sourcepub async fn get_ruleset_required_checks(
&self,
ruleset_id: &str,
) -> Result<Vec<RequiredStatusCheck>>
pub async fn get_ruleset_required_checks( &self, ruleset_id: &str, ) -> Result<Vec<RequiredStatusCheck>>
Returns the required status checks for the given ruleset.
Auto Trait Implementations§
impl Freeze for GithubApiConnection
impl !RefUnwindSafe for GithubApiConnection
impl Send for GithubApiConnection
impl Sync for GithubApiConnection
impl Unpin for GithubApiConnection
impl UnsafeUnpin for GithubApiConnection
impl !UnwindSafe for GithubApiConnection
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