Versions in this module Expand all Collapse all v0 v0.5.2 Sep 30, 2026 v0.5.1 Sep 28, 2026 v0.5.0 Sep 15, 2026 v0.4.0 Sep 15, 2026 Changes in this version type API + ListWorkflows func(ctx context.Context, owner, repo string) ([]Workflow, error) type Client + func (c *Client) ListWorkflows(ctx context.Context, owner, repo string) ([]Workflow, error) + type Workflow struct + File string + Name string v0.3.0 Sep 14, 2026 v0.2.0 Sep 12, 2026 v0.1.2 Sep 12, 2026 v0.1.1 Sep 12, 2026 v0.1.0 Sep 12, 2026 Changes in this version + const DefaultRequestTimeout + var ErrNotFound = errors.New("not found on GitHub") + var ErrUnauthorized = errors.New("not authorized by GitHub") + func Describe(err error) string + type API interface + AuthenticatedLogin func(ctx context.Context) (string, error) + FindPR func(ctx context.Context, owner, repo, branch string) (PRInfo, error) + HasToken func() bool + LastRate func() (remaining int, reset time.Time) + ListRunJobs func(ctx context.Context, owner, repo string, runID int64) ([]Job, error) + ListWorkflowRuns func(ctx context.Context, owner, repo, workflowFile, branch string, limit int) ([]Run, error) + SuccessfulRunDurations func(ctx context.Context, owner, repo, workflowFile, branch string, limit int) ([]time.Duration, error) + type CachingTransport struct + Base http.RoundTripper + func NewCachingTransport(base http.RoundTripper) *CachingTransport + func (t *CachingTransport) RoundTrip(req *http.Request) (*http.Response, error) + type Client struct + func New(ctx context.Context, opts Options) *Client + func (c *Client) AuthenticatedLogin(ctx context.Context) (string, error) + func (c *Client) FindPR(ctx context.Context, owner, repo, branch string) (PRInfo, error) + func (c *Client) HasToken() bool + func (c *Client) LastRate() (remaining int, reset time.Time) + func (c *Client) ListRunJobs(ctx context.Context, owner, repo string, runID int64) ([]Job, error) + func (c *Client) ListWorkflowRuns(ctx context.Context, owner, repo, workflowFile, branch string, limit int) ([]Run, error) + func (c *Client) SuccessfulRunDurations(ctx context.Context, owner, repo, workflowFile, branch string, limit int) ([]time.Duration, error) + type Conclusion string + const ConclusionCancelled + const ConclusionFailure + const ConclusionNeutral + const ConclusionNone + const ConclusionSkipped + const ConclusionSuccess + const ConclusionTimedOut + type Job struct + CompletedAt *time.Time + Conclusion Conclusion + HTMLURL string + ID int64 + Name string + StartedAt *time.Time + Status RunStatus + Steps []Step + func (j Job) Done() bool + func (j Job) Duration() time.Duration + func (j Job) Failed() bool + func (j Job) Skipped() bool + type Options struct + APIBase string + DisableCaching bool + DisableRetries bool + RequestTimeout time.Duration + Token string + Transport http.RoundTripper + UserAgent string + type PRInfo struct + MergedAt *time.Time + Number int + Reason string + State PRState + URL string + func Unknown(reason string) PRInfo + func (p PRInfo) Exists() bool + func (p PRInfo) Known() bool + type PRState int + const PRClosed + const PRMerged + const PRNone + const PROpen + const PRUnknown + func (s *PRState) UnmarshalJSON(data []byte) error + func (s PRState) MarshalJSON() ([]byte, error) + func (s PRState) String() string + type RateLimitError struct + Message string + ResetAt time.Time + func (e *RateLimitError) Error() string + type RetryTransport struct + Base http.RoundTripper + Sleep func(time.Duration) + func NewRetryTransport(base http.RoundTripper) *RetryTransport + func (t *RetryTransport) RoundTrip(req *http.Request) (*http.Response, error) + type Run struct + Attempt int + Branch string + Conclusion Conclusion + CreatedAt time.Time + HTMLURL string + HeadSHA string + ID int64 + Name string + Status RunStatus + UpdatedAt time.Time + func (r Run) Succeeded() bool + type RunStatus string + const StatusCompleted + const StatusInProgress + const StatusPending + const StatusQueued + const StatusWaiting + type Step struct + Conclusion Conclusion + Name string + Number int + Status RunStatus