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-4/

GitHub Repo Concierge

A helper library that uses the typed GitHub REST client to read repository metadata, triage open work, file templated issues, and render markdown previews for reports.

Capabilities

Retrieve repository snapshot

  • Given an owner and repository, return the repository name, default branch, stars, forks, watchers, open issues count, and latest push timestamp in a single struct. @test

List open items by label

  • For a repository and label filter, return the most recent open issues (including pull requests) with title, number, state, labels, assignees, pull-request flag, and HTML URL, limited to the first page according to pagination settings. @test

Create templated issue

  • Create a new issue with the provided title, body, labels, and optional assignee, and return its number and HTML URL; surface validation errors when required fields are missing. @test

Render markdown preview

  • Render a markdown string using repository context and return the resulting HTML suitable for a status email. @test

Implementation

@generates

API

package githubconcierge

import (
	"context"
	"net/http"
	"time"
)

type ClientConfig struct {
	BaseURL   string
	UploadURL string
	Token     string
	UserAgent string
}

type RepoSnapshot struct {
	Name          string
	DefaultBranch string
	Stars         int
	Forks         int
	Watchers      int
	OpenIssues    int
	LastPush      time.Time
}

type IssueFilter struct {
	Owner   string
	Repo    string
	Label   string
	PerPage int
}

type IssueSummary struct {
	Number        int
	Title         string
	State         string
	Labels        []string
	Assignees     []string
	IsPullRequest bool
	HTMLURL       string
}

type IssueDraft struct {
	Owner    string
	Repo     string
	Title    string
	Body     string
	Labels   []string
	Assignee string
}

type MarkdownRequest struct {
	Text        string
	Mode        string // "markdown" or "gfm"
	ContextRepo string
}

type Service struct {
	// internal fields hidden
}

func NewService(ctx context.Context, cfg ClientConfig, httpClient *http.Client) (*Service, error)

func (s *Service) SnapshotRepo(ctx context.Context, owner, repo string) (RepoSnapshot, error)

func (s *Service) ListOpenByLabel(ctx context.Context, filter IssueFilter) ([]IssueSummary, error)

func (s *Service) CreateIssue(ctx context.Context, draft IssueDraft) (IssueSummary, error)

func (s *Service) RenderMarkdown(ctx context.Context, req MarkdownRequest) (string, error)

Dependencies { .dependencies }

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

Typed GitHub REST v3 client; use its service methods rather than raw HTTP requests.

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

tile.json