adapter

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorized = fmt.Errorf("unauthorized")

ErrUnauthorized is returned when GitHub responds with 401.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides minimal GitHub REST API access used by MCP tools.

func New

func New(domain string) *Client

New creates a new Client for the given GitHub domain. If domain is empty or github.com, it targets public GitHub; otherwise Enterprise base.

func (*Client) ListRepoIssues

func (c *Client) ListRepoIssues(ctx context.Context, token, owner, name, state string) ([]Issue, error)

ListRepoIssues lists issues for a repository.

func (*Client) ListRepoPRs

func (c *Client) ListRepoPRs(ctx context.Context, token, owner, name, state string) ([]PullRequest, error)

ListRepoPRs lists pull requests for a repository.

func (*Client) ListRepos

func (c *Client) ListRepos(ctx context.Context, token, visibility, affiliation string, perPage int) ([]Repo, error)

ListRepos lists repositories for the authenticated user.

type Issue

type Issue struct {
	ID           int64
	Number       int
	Title, State string
}

type PullRequest

type PullRequest struct {
	ID           int64
	Number       int
	Title, State string
}

type Repo

type Repo struct {
	ID             int64
	Name, FullName string
}

Minimal types mirrored in MCP package for decoupling.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL