Documentation
¶
Overview ¶
Package gateway provides a gateway to the GitHub API, abstracting away the underlying REST and GraphQL clients.
Index ¶
- type Fetcher
- type GitHubGateway
- func (g *GitHubGateway) FetchCommits(ctx context.Context, org, user, dateRange string) (map[string]int, error)
- func (g *GitHubGateway) FetchCreatedPRs(ctx context.Context, org, user, dateRange string) (map[string]int, error)
- func (g *GitHubGateway) FetchPRLeadTimes(ctx context.Context, org, user, dateRange string) (map[string][]PRLeadTimeData, error)
- func (g *GitHubGateway) FetchReviewedPRs(ctx context.Context, org, user, dateRange string) (map[string]int, error)
- type PRLeadTimeData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher interface {
FetchCommits(ctx context.Context, org, user, dateRange string) (map[string]int, error)
FetchCreatedPRs(ctx context.Context, org, user, dateRange string) (map[string]int, error)
FetchReviewedPRs(ctx context.Context, org, user, dateRange string) (map[string]int, error)
// New method to fetch lead time data for pull requests.
FetchPRLeadTimes(ctx context.Context, org, user, dateRange string) (map[string][]PRLeadTimeData, error)
}
Fetcher defines the behavior of a gateway for fetching information from GitHub.
type GitHubGateway ¶
type GitHubGateway struct {
// contains filtered or unexported fields
}
GitHubGateway is the concrete implementation of the Fetcher interface.
func (*GitHubGateway) FetchCommits ¶
func (*GitHubGateway) FetchCreatedPRs ¶
func (*GitHubGateway) FetchPRLeadTimes ¶
func (g *GitHubGateway) FetchPRLeadTimes(ctx context.Context, org, user, dateRange string) (map[string][]PRLeadTimeData, error)
FetchPRLeadTimes fetches PR creation and last review timestamps.
func (*GitHubGateway) FetchReviewedPRs ¶
Click to show internal directories.
Click to hide internal directories.