Documentation
¶
Overview ¶
Package github provides a client for interacting with the GitHub Actions API.
Index ¶
- func FetchJobs(ctx context.Context, client *Client, owner, repo string, workflowID int64, ...) error
- func FetchRuns(ctx context.Context, client *Client, owner, repo string, workflowID int64, ...) ([]int64, error)
- func FetchStoredRunJobs(ctx context.Context, client *Client, owner, repo string, workflowID int64, ...) error
- type Client
- type RunOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchJobs ¶
func FetchJobs(ctx context.Context, client *Client, owner, repo string, workflowID int64, store *storage.Store, runIDs []int64) error
FetchJobs fetches jobs for the given run IDs and stores them.
func FetchRuns ¶
func FetchRuns(ctx context.Context, client *Client, owner, repo string, workflowID int64, store *storage.Store, opts *RunOptions) ([]int64, error)
FetchRuns fetches workflow runs from GitHub and stores them locally. It skips runs that already exist in storage. Returns the IDs of newly fetched runs.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the GitHub API client with rate limit logging.
func NewClient ¶
NewClient creates a new GitHub client with the given token. If token is empty, requests will be unauthenticated (lower rate limits).
func (*Client) Actions ¶
func (c *Client) Actions() *github.ActionsService
Actions returns the Actions service for accessing GitHub Actions API.
func (*Client) RateLimits ¶
RateLimits returns current rate limit status.
type RunOptions ¶
type RunOptions struct {
Created string // Date filter in format '2021-10-12' or '2021-10-29T22:40:19Z'
}
RunOptions configures the FetchRuns operation.
Click to show internal directories.
Click to hide internal directories.