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 helper that uses the GitHub Go SDK dependency to construct ready-to-send requests for JSON endpoints, form-encoded exchanges, and binary uploads. Leverage the dependency's request-building helpers rather than crafting raw HTTP requests manually.
title and body fields. @testclient_id, client_secret, code, and redirect_uri as form-encoded fields (including optional state) with a JSON response expected. @testname and optional label query parameters, uses the provided media type, and streams the provided reader with the declared size. @test@generates
type RequestFactory struct {
Client interface {
Do(req *http.Request) (*http.Response, error)
}
APIBaseURL string
UploadBaseURL string
Token string
APIVersion string
}
func NewRequestFactory(client interface{ Do(req *http.Request) (*http.Response, error) }, apiBaseURL, uploadBaseURL, token, apiVersion string) *RequestFactory
func (f *RequestFactory) BuildJSONDiscussionRequest(ctx context.Context, owner, repo, title, body, previewAccept string) (*http.Request, error)
func (f *RequestFactory) BuildFormTokenRequest(ctx context.Context, clientID, clientSecret, code, redirectURI, state string) (*http.Request, error)
func (f *RequestFactory) BuildUploadAssetRequest(ctx context.Context, uploadURL, fileName, label, mediaType string, content io.ReadSeeker, size int64) (*http.Request, error)Provides helpers for constructing GitHub REST and upload requests.
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