Documentation
¶
Index ¶
- Variables
- type GHFetcher
- type GithubClient
- type GithubClientImpl
- func (lre *GithubClientImpl) ListIssues(ctx context.Context, owner string, repo string, page int) ([]*github.Issue, *github.Response, error)
- func (lre *GithubClientImpl) ListPullRequests(ctx context.Context, owner string, repo string, cursor string) ([]PullRequest, string, error)
- func (lre *GithubClientImpl) ListRepositoryEvents(ctx context.Context, owner, repo string, page int) ([]*github.Event, *github.Response, error)
- type PullRequest
- type PullRequestGapi
- func (p *PullRequestGapi) Author() string
- func (p *PullRequestGapi) CommitsCount() int
- func (p *PullRequestGapi) CreatedAt() time.Time
- func (p *PullRequestGapi) Number() int
- func (p *PullRequestGapi) Reviews() []Review
- func (p *PullRequestGapi) State() string
- func (p *PullRequestGapi) Title() string
- type PullRequestGql
- type PullRequestReviewState
- type PullRequestState
- type RedisRewarder
- type Review
- type ReviewGql
- type Rewarder
- type RewarderCfg
Constants ¶
This section is empty.
Variables ¶
View Source
var AllPullRequestReviewState = []PullRequestReviewState{ PullRequestReviewStateApproved, PullRequestReviewStateChangesRequested, PullRequestReviewStateCommented, PullRequestReviewStateDismissed, PullRequestReviewStatePending, }
View Source
var AllPullRequestState = []PullRequestState{ PullRequestStateClosed, PullRequestStateMerged, PullRequestStateOpen, }
Functions ¶
This section is empty.
Types ¶
type GHFetcher ¶
type GHFetcher struct {
// contains filtered or unexported fields
}
func NewGHFetcher ¶
type GithubClient ¶
type GithubClient interface { ListRepositoryEvents(ctx context.Context, owner, repo string, page int) ([]*github.Event, *github.Response, error) ListPullRequests(ctx context.Context, owner string, repo string, cursor string) ([]PullRequest, string, error) ListIssues(ctx context.Context, owner string, repo string, page int) ([]*github.Issue, *github.Response, error) }
type GithubClientImpl ¶
type GithubClientImpl struct {
// contains filtered or unexported fields
}
func NewGithubClientImpl ¶
func NewGithubClientImpl(cl *github.Client, gr graphql.Client) *GithubClientImpl
func (*GithubClientImpl) ListIssues ¶
func (lre *GithubClientImpl) ListIssues(ctx context.Context, owner string, repo string, page int) ([]*github.Issue, *github.Response, error)
ListIssues implements GithubClient.
func (*GithubClientImpl) ListPullRequests ¶
func (lre *GithubClientImpl) ListPullRequests(ctx context.Context, owner string, repo string, cursor string) ([]PullRequest, string, error)
ListPullRequests implements GithubClient.
type PullRequest ¶
type PullRequestGapi ¶
type PullRequestGapi struct {
// contains filtered or unexported fields
}
func (*PullRequestGapi) Author ¶
func (p *PullRequestGapi) Author() string
Author implements PullRequest.
func (*PullRequestGapi) CommitsCount ¶
func (p *PullRequestGapi) CommitsCount() int
CommitsCount implements PullRequest.
func (*PullRequestGapi) CreatedAt ¶
func (p *PullRequestGapi) CreatedAt() time.Time
CreatedAt implements PullRequest.
func (*PullRequestGapi) Number ¶
func (p *PullRequestGapi) Number() int
Number implements PullRequest.
func (*PullRequestGapi) Reviews ¶
func (p *PullRequestGapi) Reviews() []Review
Reviews implements PullRequest.
func (*PullRequestGapi) State ¶
func (p *PullRequestGapi) State() string
State implements PullRequest.
func (*PullRequestGapi) Title ¶
func (p *PullRequestGapi) Title() string
Title implements PullRequest.
type PullRequestGql ¶
type PullRequestGql struct {
// contains filtered or unexported fields
}
func (*PullRequestGql) Author ¶
func (p *PullRequestGql) Author() string
Author implements PullRequest.
func (*PullRequestGql) CommitsCount ¶
func (p *PullRequestGql) CommitsCount() int
CommitsCount implements PullRequest.
func (*PullRequestGql) CreatedAt ¶
func (p *PullRequestGql) CreatedAt() time.Time
CreatedAt implements PullRequest.
func (*PullRequestGql) Number ¶
func (p *PullRequestGql) Number() int
Number implements PullRequest.
func (*PullRequestGql) Reviews ¶
func (p *PullRequestGql) Reviews() []Review
Reviews implements PullRequest.
func (*PullRequestGql) State ¶
func (p *PullRequestGql) State() string
Status implements PullRequest.
func (*PullRequestGql) Title ¶
func (p *PullRequestGql) Title() string
Title implements PullRequest.
type PullRequestReviewState ¶
type PullRequestReviewState string
The possible states of a pull request review.
const ( // A review allowing the pull request to merge. PullRequestReviewStateApproved PullRequestReviewState = "APPROVED" // A review blocking the pull request from merging. PullRequestReviewStateChangesRequested PullRequestReviewState = "CHANGES_REQUESTED" // An informational review. PullRequestReviewStateCommented PullRequestReviewState = "COMMENTED" // A review that has been dismissed. PullRequestReviewStateDismissed PullRequestReviewState = "DISMISSED" // A review that has not yet been submitted. PullRequestReviewStatePending PullRequestReviewState = "PENDING" )
type PullRequestState ¶
type PullRequestState string
The possible states of a pull request.
const ( // A pull request that has been closed without being merged. PullRequestStateClosed PullRequestState = "CLOSED" // A pull request that has been closed by being merged. PullRequestStateMerged PullRequestState = "MERGED" // A pull request that is still open. PullRequestStateOpen PullRequestState = "OPEN" )
type RedisRewarder ¶
type RedisRewarder struct {
// contains filtered or unexported fields
}
func NewRedisRewarder ¶
func NewRedisRewarder(cli *redis.Client, cfg *RewarderCfg) *RedisRewarder
Click to show internal directories.
Click to hide internal directories.