Documentation
¶
Index ¶
- type Client
- func (c *Client) AddLabels(labels []string) error
- func (c *Client) ApprovePR(message string) error
- func (c *Client) AssignReviewers(reviewers []string) error
- func (c *Client) BranchExists(branchName string) (bool, error)
- func (c *Client) CheckPRStatus(expectedState string) error
- func (c *Client) CheckRunsStatus() (bool, []git.CheckRun, error)
- func (c *Client) CheckUserPermissions(username string, requiredPerms []string) (bool, string, error)
- func (c *Client) CherryPickCommit(commitSHA, targetBranch string) error
- func (c *Client) ClosePR() error
- func (c *Client) CreateBranch(branchName, baseBranch string) error
- func (c *Client) CreatePR(title, body, head, base string) (*git.PullRequest, error)
- func (c *Client) DismissApprove(message string) error
- func (c *Client) FindIssue(opts git.IssueSearchOptions) (*git.Issue, error)
- func (c *Client) GetAvailableMergeMethods() ([]string, error)
- func (c *Client) GetComments() ([]git.Comment, error)
- func (c *Client) GetCommits() ([]git.Commit, error)
- func (c *Client) GetIssue(issueNumber int) (*git.Issue, error)
- func (c *Client) GetLGTMVotes(comments []git.Comment, requiredPerms []string, debugMode bool, ...) (int, map[string]string, error)
- func (c *Client) GetLabels() ([]string, error)
- func (c *Client) GetPR() (*git.PullRequest, error)
- func (c *Client) GetRequestedReviewers() ([]string, error)
- func (c *Client) GetReviews() ([]git.Review, error)
- func (c *Client) GetUserPermission(username string) (string, error)
- func (c *Client) GetWorkflowRunIDsFromCheckSuite(checkSuiteID int64) ([]int64, error)
- func (c *Client) MergePR(method string) error
- func (c *Client) PostComment(message string) error
- func (c *Client) RebasePR() error
- func (c *Client) RemoveLabels(labels []string) error
- func (c *Client) RemoveReviewers(reviewers []string) error
- func (c *Client) RerunWorkflowRunFailedJobs(runID int64) error
- func (c *Client) TriggerWorkflowDispatch(workflowFile, ref string, inputs map[string]interface{}) error
- func (c *Client) UpdateIssueBody(issueNumber int, body string) error
- func (c *Client) UpdatePRBody(body string) error
- type Factory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client implements the GitClient interface for GitHub
func (*Client) AssignReviewers ¶
AssignReviewers assigns users as reviewers to the PR (one by one to ensure all are assigned)
func (*Client) BranchExists ¶
BranchExists checks if a branch exists in the repository
func (*Client) CheckPRStatus ¶
CheckPRStatus verifies if the PR is in the expected state
func (*Client) CheckRunsStatus ¶
CheckRunsStatus checks if all check runs are successful with pagination
func (*Client) CheckUserPermissions ¶
func (c *Client) CheckUserPermissions(username string, requiredPerms []string) (bool, string, error)
CheckUserPermissions validates if user has required permissions
func (*Client) CherryPickCommit ¶
CherryPickCommit cherry-picks a commit to a branch by applying only the changes from that commit
func (*Client) CreateBranch ¶
CreateBranch creates a new branch from the specified base branch
func (*Client) CreatePR ¶
func (c *Client) CreatePR(title, body, head, base string) (*git.PullRequest, error)
CreatePR creates a new pull request
func (*Client) DismissApprove ¶
DismissApprove dismisses the token user's approval review
func (*Client) GetAvailableMergeMethods ¶
GetAvailableMergeMethods retrieves the available merge methods for the pull request
func (*Client) GetComments ¶
GetComments retrieves all comments from the pull request with pagination
func (*Client) GetCommits ¶
GetCommits retrieves commits from a pull request
func (*Client) GetLGTMVotes ¶
func (c *Client) GetLGTMVotes(comments []git.Comment, requiredPerms []string, debugMode bool, ignoreUserRemove ...string) (int, map[string]string, error)
GetLGTMVotes retrieves and validates LGTM votes using provided or fetched comments
func (*Client) GetPR ¶
func (c *Client) GetPR() (*git.PullRequest, error)
GetPR retrieves the pull request information
func (*Client) GetRequestedReviewers ¶
GetRequestedReviewers retrieves current requested reviewers for the PR
func (*Client) GetReviews ¶
GetReviews retrieves all reviews from the pull request with pagination
func (*Client) GetUserPermission ¶
GetUserPermission gets the user's permission level for the repository
func (*Client) GetWorkflowRunIDsFromCheckSuite ¶
GetWorkflowRunIDsFromCheckSuite retrieves workflow run IDs from a check suite Returns a slice of workflow run IDs associated with the check suite
func (*Client) PostComment ¶
PostComment posts a comment to the pull request
func (*Client) RemoveLabels ¶
RemoveLabels removes labels from the pull request
func (*Client) RemoveReviewers ¶
RemoveReviewers removes users from PR reviewers
func (*Client) RerunWorkflowRunFailedJobs ¶
RerunWorkflowRunFailedJobs reruns failed jobs in a workflow run
func (*Client) TriggerWorkflowDispatch ¶
func (c *Client) TriggerWorkflowDispatch(workflowFile, ref string, inputs map[string]interface{}) error
TriggerWorkflowDispatch triggers a workflow via workflow_dispatch event
func (*Client) UpdateIssueBody ¶
UpdateIssueBody updates an issue body/description
func (*Client) UpdatePRBody ¶
UpdatePRBody updates the pull request body/description