pub struct GitHubService { /* private fields */ }Implementations§
Source§impl GitHubService
impl GitHubService
pub fn new(config: GitHubConfig) -> Self
pub fn config(&self) -> &GitHubConfig
pub async fn start(&mut self) -> Result<()>
pub async fn stop(&mut self) -> Result<()>
pub async fn is_running(&self) -> bool
pub async fn get_repository( &self, owner: &str, repo: &str, ) -> Result<GitHubRepository>
pub async fn create_issue( &self, params: CreateIssueParams, ) -> Result<GitHubIssue>
pub async fn get_issue( &self, owner: &str, repo: &str, issue_number: u64, ) -> Result<GitHubIssue>
pub async fn list_issues( &self, params: ListIssuesParams, ) -> Result<Vec<GitHubIssue>>
pub async fn create_pull_request( &self, params: CreatePullRequestParams, ) -> Result<GitHubPullRequest>
pub async fn get_pull_request( &self, owner: &str, repo: &str, pull_number: u64, ) -> Result<GitHubPullRequest>
pub async fn list_pull_requests( &self, params: ListPullRequestsParams, ) -> Result<Vec<GitHubPullRequest>>
pub async fn merge_pull_request( &self, params: MergePullRequestParams, ) -> Result<(String, bool, String)>
pub async fn create_branch( &self, params: CreateBranchParams, ) -> Result<GitHubBranch>
Sourcepub async fn delete_branch(
&self,
owner: &str,
repo: &str,
branch_name: &str,
) -> Result<()>
pub async fn delete_branch( &self, owner: &str, repo: &str, branch_name: &str, ) -> Result<()>
Delete a branch.
pub async fn create_commit( &self, params: CreateCommitParams, ) -> Result<GitHubCommit>
pub async fn create_review( &self, params: CreateReviewParams, ) -> Result<GitHubReview>
pub async fn create_comment( &self, params: CreateCommentParams, ) -> Result<GitHubComment>
pub async fn get_authenticated_user(&self) -> Result<GitHubUser>
Auto Trait Implementations§
impl Freeze for GitHubService
impl !RefUnwindSafe for GitHubService
impl Send for GitHubService
impl Sync for GitHubService
impl Unpin for GitHubService
impl UnsafeUnpin for GitHubService
impl !UnwindSafe for GitHubService
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> 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