Go client library for accessing the GitHub API v3
Agent Success
Agent success rate when using this tile
65%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.14x
Baseline
Agent success rate without this tile
57%
Build a Go utility layer that inspects GitHub Actions resources for a repository and performs limited administration tasks around runners, caches, artifacts, and OIDC subject templates.
@generates
type ActionsToolkit struct {
// holds authenticated GitHub client and base URLs
}
func NewActionsToolkit(httpClient *http.Client, apiBaseURL, uploadBaseURL, token string) (*ActionsToolkit, error)
type RunnerSummary struct {
Online int
Offline int
Busy int
LabelCounts map[string]int
}
func (t *ActionsToolkit) RunnerSnapshot(ctx context.Context, owner, repo, label string) (*RunnerSummary, error)
type CacheEntry struct {
Key string
Ref string
SizeBytes int64
LastAccessed time.Time
Deleted bool
}
type CacheReport struct {
TotalBytes int64
Entries []CacheEntry
}
func (t *ActionsToolkit) CleanupCaches(ctx context.Context, owner, repo, keyPrefix string, cutoff time.Time, dryRun bool) (*CacheReport, error)
func (t *ActionsToolkit) DownloadArtifactByName(ctx context.Context, owner, repo, workflowFile, artifactName string, dest io.Writer) error
func (t *ActionsToolkit) EnsureOIDCTemplateClaim(ctx context.Context, owner, repo, requiredClaim string) (claims []string, changed bool, err error)Typed GitHub REST v3 client for Actions runners, caches, OIDC templates, and artifact redirects.
tessl i tessl/golang-github-com-google-go-github@79.0.1docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10