Documentation
¶
Index ¶
- func New(gh *GitHub, owner, repo, defaultBranch string) *prdiff
- func NewClosedPullRequestListOptions(opts ...PullRequestListOptionFunc) *github.PullRequestListOptions
- type GitHub
- func (gh *GitHub) CompareRepositoryCommits(ctx context.Context, owner, repo, base, head string) (*github.CommitsComparison, *github.Response, error)
- func (gh *GitHub) GetRepository(ctx context.Context, owner, repo string) (*github.Repository, *github.Response, error)
- func (gh *GitHub) GetRepositoryLatestRelease(ctx context.Context, owner, repo string) (*github.RepositoryRelease, *github.Response, error)
- func (gh *GitHub) ListPullRequests(ctx context.Context, owner, repo string, opt *github.PullRequestListOptions) ([]*github.PullRequest, *github.Response, error)
- type GitHubAPI
- type PullRequestListOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClosedPullRequestListOptions ¶
func NewClosedPullRequestListOptions(opts ...PullRequestListOptionFunc) *github.PullRequestListOptions
NewClosedPullRequestListOptions generates *github.PullRequestListOptions for fetching closed utmost count PRs with update time desc.
Types ¶
type GitHub ¶
type GitHub struct {
// contains filtered or unexported fields
}
GitHub manages GitHub API client from google/go-github.
func (*GitHub) CompareRepositoryCommits ¶
func (gh *GitHub) CompareRepositoryCommits(ctx context.Context, owner, repo, base, head string) (*github.CommitsComparison, *github.Response, error)
CompareRepositoryCommits calls `Repositories.CompareCommits`.
func (*GitHub) GetRepository ¶
func (gh *GitHub) GetRepository(ctx context.Context, owner, repo string) (*github.Repository, *github.Response, error)
GetRepository calls `Repositories.Get`.
func (*GitHub) GetRepositoryLatestRelease ¶
func (gh *GitHub) GetRepositoryLatestRelease(ctx context.Context, owner, repo string) (*github.RepositoryRelease, *github.Response, error)
GetRepositoryLatestRelease calls `Repositories.GetLatestRelease`.
func (*GitHub) ListPullRequests ¶
func (gh *GitHub) ListPullRequests(ctx context.Context, owner, repo string, opt *github.PullRequestListOptions) ([]*github.PullRequest, *github.Response, error)
ListPullRequests calls `PullRequests.List`.
type GitHubAPI ¶
type GitHubAPI interface {
GetRepository(ctx context.Context, owner, repo string) (*github.Repository, *github.Response, error)
GetRepositoryLatestRelease(ctx context.Context, owner, repo string) (*github.RepositoryRelease, *github.Response, error)
ListPullRequests(ctx context.Context, owner, repo string, opt *github.PullRequestListOptions) ([]*github.PullRequest, *github.Response, error)
CompareRepositoryCommits(ctx context.Context, owner, repo, base, head string) (*github.CommitsComparison, *github.Response, error)
}
GitHubAPI represents required API calls for GitHub.
type PullRequestListOptionFunc ¶
type PullRequestListOptionFunc func(*github.PullRequestListOptions)
PullRequestListOptionFunc represents functional option for generating *github.PullRequestListOptions
func WithBase ¶
func WithBase(base string) PullRequestListOptionFunc
WithBase modifies Base field of *github.PullRequestListOptions.
Click to show internal directories.
Click to hide internal directories.