util

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubClient

func NewGithubClient(ctx context.Context, token string) *github.Client

NewGithubClient creates a client for communicating with the GitHub API using the provided token.

Types

type PRCallback

type PRCallback func(context.Context, *github.PullRequest) error

PRCallback is a type for callbacks for processing pull requests

type PullRequestQuery

type PullRequestQuery struct {
	Org     string
	Repo    string
	DevMode bool
	Client  *github.Client
}

PullRequestQuery holds the parameters for iterating over pull requests

func (*PullRequestQuery) GetCommits added in v0.6.0

func (*PullRequestQuery) GetIssueComments

func (q *PullRequestQuery) GetIssueComments(ctx context.Context, pr *github.PullRequest) ([]*github.IssueComment, error)

func (*PullRequestQuery) GetPRComments

func (*PullRequestQuery) GetReviews

func (*PullRequestQuery) IsMerged

func (q *PullRequestQuery) IsMerged(ctx context.Context, pr *github.PullRequest) (bool, error)

func (*PullRequestQuery) IteratePullRequests

func (q *PullRequestQuery) IteratePullRequests(ctx context.Context, callback PRCallback) error

IteratePullRequests queries for all pull requests and invokes the callback with each PR individually

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL