{"modulePath":"github.com/AlaudaDevops/toolbox/pr-cli","version":"v0.0.0-20261019083812-38d5e0ad0d24","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Types\n\n```go\ntype Client struct {\n\t*logrus.Logger\n\t// contains filtered or unexported fields\n}\n```\nClient implements the GitClient interface for GitHub\n\n```go\nfunc (c *Client) AddLabels(labels []string) error\n```\nAddLabels adds labels to the pull request\n\n```go\nfunc (c *Client) ApprovePR(message string) error\n```\nApprovePR creates a review approval for the PR\n\n```go\nfunc (c *Client) AssignReviewers(reviewers []string) error\n```\nAssignReviewers assigns users as reviewers to the PR (one by one to ensure all are assigned)\n\n```go\nfunc (c *Client) BranchExists(branchName string) (bool, error)\n```\nBranchExists checks if a branch exists in the repository\n\n```go\nfunc (c *Client) CheckPRStatus(expectedState string) error\n```\nCheckPRStatus verifies if the PR is in the expected state\n\n```go\nfunc (c *Client) CheckRunsStatus() (bool, []git.CheckRun, error)\n```\nCheckRunsStatus checks if all check runs are successful with pagination\n\n```go\nfunc (c *Client) CheckUserPermissions(username string, requiredPerms []string) (bool, string, error)\n```\nCheckUserPermissions validates if user has required permissions\n\n```go\nfunc (c *Client) CherryPickCommit(commitSHA, targetBranch string) error\n```\nCherryPickCommit cherry-picks a commit to a branch by applying only the changes from that commit\n\n```go\nfunc (c *Client) ClosePR() error\n```\nClosePR closes the pull request without merging\n\n```go\nfunc (c *Client) CreateBranch(branchName, baseBranch string) error\n```\nCreateBranch creates a new branch from the specified base branch\n\n```go\nfunc (c *Client) CreatePR(title, body, head, base string) (*git.PullRequest, error)\n```\nCreatePR creates a new pull request\n\n```go\nfunc (c *Client) DismissApprove(message string) error\n```\nDismissApprove dismisses the token user's approval review\n\n```go\nfunc (c *Client) FindIssue(opts git.IssueSearchOptions) (*git.Issue, error)\n```\nFindIssue locates an issue using search options\n\n```go\nfunc (c *Client) GetAvailableMergeMethods() ([]string, error)\n```\nGetAvailableMergeMethods retrieves the available merge methods for the pull request\n\n```go\nfunc (c *Client) GetComments() ([]git.Comment, error)\n```\nGetComments retrieves all comments from the pull request with pagination\n\n```go\nfunc (c *Client) GetCommits() ([]git.Commit, error)\n```\nGetCommits retrieves commits from a pull request\n\n```go\nfunc (c *Client) GetIssue(issueNumber int) (*git.Issue, error)\n```\nGetIssue retrieves an issue by number\n\n```go\nfunc (c *Client) GetLGTMVotes(comments []git.Comment, requiredPerms []string, debugMode bool, ignoreUserRemove ...string) (int, map[string]string, error)\n```\nGetLGTMVotes retrieves and validates LGTM votes using provided or fetched comments\n\n```go\nfunc (c *Client) GetLabels() ([]string, error)\n```\nGetLabels retrieves current labels of the pull request\n\n```go\nfunc (c *Client) GetPR() (*git.PullRequest, error)\n```\nGetPR retrieves the pull request information\n\n```go\nfunc (c *Client) GetRequestedReviewers() ([]string, error)\n```\nGetRequestedReviewers retrieves current requested reviewers for the PR\n\n```go\nfunc (c *Client) GetReviews() ([]git.Review, error)\n```\nGetReviews retrieves all reviews from the pull request with pagination\n\n```go\nfunc (c *Client) GetUserPermission(username string) (string, error)\n```\nGetUserPermission gets the user's permission level for the repository\n\n```go\nfunc (c *Client) GetWorkflowRunIDsFromCheckSuite(checkSuiteID int64) ([]int64, error)\n```\nGetWorkflowRunIDsFromCheckSuite retrieves workflow run IDs from a check suite Returns a slice of workflow run IDs associated with the check suite\n\n```go\nfunc (c *Client) MergePR(method string) error\n```\nMergePR merges the pull request with the specified method\n\n```go\nfunc (c *Client) PostComment(message string) error\n```\nPostComment posts a comment to the pull request\n\n```go\nfunc (c *Client) RebasePR() error\n```\nRebasePR updates the PR branch with the base branch\n\n```go\nfunc (c *Client) RemoveLabels(labels []string) error\n```\nRemoveLabels removes labels from the pull request\n\n```go\nfunc (c *Client) RemoveReviewers(reviewers []string) error\n```\nRemoveReviewers removes users from PR reviewers\n\n```go\nfunc (c *Client) RerunWorkflowRunFailedJobs(runID int64) error\n```\nRerunWorkflowRunFailedJobs reruns failed jobs in a workflow run\n\n```go\nfunc (c *Client) TriggerWorkflowDispatch(workflowFile, ref string, inputs map[string]interface{}) error\n```\nTriggerWorkflowDispatch triggers a workflow via workflow\\_dispatch event\n\n```go\nfunc (c *Client) UpdateIssueBody(issueNumber int, body string) error\n```\nUpdateIssueBody updates an issue body/description\n\n```go\nfunc (c *Client) UpdatePRBody(body string) error\n```\nUpdatePRBody updates the pull request body/description\n\n```go\ntype Factory struct{}\n```\nFactory implements ClientFactory for GitHub\n\n```go\nfunc (f *Factory) CreateClient(logger *logrus.Logger, config *git.Config) (git.GitClient, error)\n```\nCreateClient creates a new GitHub client\n\n","path":"github.com/AlaudaDevops/toolbox/pr-cli/pkg/platforms/github","name":"github","synopsis":"","isRedistributable":true}
