CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/golang-github-com-google-go-github

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%

Overview
Eval results
Files

task.mdevals/scenario-7/

GitHub Rate-Aware Issue Fetcher

Build a helper that fetches open issues for a repository while honoring API rate limits and exposing rate metadata alongside results.

Capabilities

Returns issues with rate info

  • Fetching the first page of open issues yields issue summaries and captures limit, remaining, and reset timestamp from the HTTP response metadata; retry-after should be zero when not provided. @test

Waits on exhausted limit

  • When the current remaining count is zero, the helper waits until the documented reset moment before issuing the next request, then continues fetching subsequent pages. @test

Reports secondary limit guidance

  • If the API signals a secondary rate limit with a retry-after duration, the helper surfaces the suggested wait time in the returned error detail. @test

Implementation

@generates

API

type RateInfo struct {
    Limit      int
    Remaining  int
    Reset      time.Time
    RetryAfter time.Duration
}

type IssueSummary struct {
    Number int
    Title  string
    URL    string
}

type RateAwareClient struct {
    // internal fields elided
}

func NewRateAwareClient(httpClient *http.Client, token string) (*RateAwareClient, error)

// ListOpenIssues retrieves open issues for the repository, respecting primary rate limits and surfacing secondary-limit retry hints.
// It aggregates across pages until completion or until a rate limit condition requires pausing.
func (c *RateAwareClient) ListOpenIssues(ctx context.Context, owner string, repo string, perPage int) ([]IssueSummary, RateInfo, error)

Dependencies { .dependencies }

github.com/google/go-github/v80/github { .dependency }

Typed client for GitHub's REST API with rate-limit metadata and typed response helpers.

tessl i tessl/golang-github-com-google-go-github@79.0.1

tile.json