Documentation
¶
Overview ¶
Package githubread is the GitHub read baseline adapter (WP5.2): issue and pull-request counts over a window from the search API, through the WP2.3 client (rate limits, call budget, and no way to write without an actions log), with its own read-only key from [integrations.github].
Index ¶
Constants ¶
View Source
const DefaultURL = "https://api.github.com"
DefaultURL is the GitHub REST API (GHES is unsupported in 0.1).
Variables ¶
View Source
var Metrics = []string{"issues_opened", "issues_closed", "prs_opened", "prs_merged"}
Metrics this adapter answers.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client reads one repository.
func New ¶
func New(c integrations.Conn, repo string, rt http.RoundTripper, now func() time.Time) (*Client, error)
New returns a client for a resolved [integrations.github]; repo is the repository to read (its project, else the current repository).
func (*Client) Baseline ¶
func (c *Client) Baseline(ctx context.Context, q integrations.Query) (integrations.Baseline, error)
Baseline checks the token's scope, then counts the metric's search results.
Click to show internal directories.
Click to hide internal directories.