Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateStatus(owner, repo string, pr *github.PullRequest, status *github.RepoStatus) (*github.RepoStatus, *github.Response, error)
- func (c *Client) ForEachPR(owner, repo string, opts *github.PullRequestListOptions, continueOnError bool, ...) error
- func (c *Client) GetCombinedStatus(owner, repo, ref string) (*github.CombinedStatus, *github.Response, error)
- type PRMungeFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an augmentation of the go-github client that adds retry logic, rate limiting, and pagination handling to some of the client functions.
func (*Client) CreateStatus ¶
func (c *Client) CreateStatus(owner, repo string, pr *github.PullRequest, status *github.RepoStatus) (*github.RepoStatus, *github.Response, error)
CreateStatus creates or updates a status context on the indicated reference. This function limits rate and does retries if needed.
func (*Client) ForEachPR ¶
func (c *Client) ForEachPR(owner, repo string, opts *github.PullRequestListOptions, continueOnError bool, mungePR PRMungeFunc) error
ForEachPR iterates over all PRs that fit the specified criteria, calling the munge function on every PR. This function limits rate, does retries if needed, and handles pagination. If the munge function returns a non-nil error, ForEachPR will return immediately with a non-nil error unless continueOnError is true in which case an error will be logged and the remaining PRs will be munged.
func (*Client) GetCombinedStatus ¶
func (c *Client) GetCombinedStatus(owner, repo, ref string) (*github.CombinedStatus, *github.Response, error)
GetCombinedStatus retrieves the CominedStatus for the specified reference. This function limits rate, does retries if needed and handles pagination.
type PRMungeFunc ¶
type PRMungeFunc func(*github.PullRequest) error