Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AroundFunctionCreator ¶
type AroundFunctionCreator interface {
// contains filtered or unexported methods
}
AroundFunctionCreator creates function that does operations around nested inner function
func NewPaginationChecker ¶
func NewPaginationChecker() AroundFunctionCreator
NewPaginationChecker creates an instance of paginationChecker that checks if there is a next page with additional results
func NewRateLimitWatcher ¶
func NewRateLimitWatcher(c Client, logger log.Logger, threshold int) AroundFunctionCreator
NewRateLimitWatcher creates an instance of rateLimitWatcher that watches GH API rate limits
func NewRetryWrapper ¶
func NewRetryWrapper(retries int, sleep time.Duration) AroundFunctionCreator
NewRetryWrapper creates an instance of retryWrapper that retries requests until either there is no error or limit is reached
type Client ¶
type Client interface { GetPermissionLevel(owner, repo, user string) (*gogh.RepositoryPermissionLevel, error) GetPullRequest(owner, repo string, prNumber int) (*gogh.PullRequest, error) ListPullRequestFiles(owner, repo string, prNumber int) ([]scm.ChangedFile, error) GetPullRequestReviews(owner, repo string, prNumber int) ([]*gogh.PullRequestReview, error) ListIssueComments(issue scm.RepositoryIssue) ([]*gogh.IssueComment, error) CreateIssueComment(issue scm.RepositoryIssue, commentMsg *string) error EditIssueComment(issue scm.RepositoryIssue, commentID int64, commentMsg *string) error CreateStatus(change scm.RepositoryChange, repoStatus *gogh.RepoStatus) error AddPullRequestLabel(change scm.RepositoryChange, prNumber int, label []string) error RemovePullRequestLabel(change scm.RepositoryChange, prNumber int, label string) error EditPullRequest(*gogh.PullRequest) error GetRateLimit() (*gogh.RateLimits, error) RegisterAroundFunctions(aroundCreators ...AroundFunctionCreator) }
Client manages communication with the GitHub API.
Click to show internal directories.
Click to hide internal directories.