github

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a thin GitHub REST API client. It reads GITHUB_TOKEN from the environment and sends it as a Bearer token when present.

func New

func New() *Client

New returns a Client configured from the environment.

func (*Client) ListBranches

func (c *Client) ListBranches(owner, repo string) ([]string, error)

ListBranches returns the branch names for owner/repo.

func (*Client) ListTags

func (c *Client) ListTags(owner, repo string) ([]string, error)

ListTags returns semver tags for owner/repo sorted descending (newest first).

func (*Client) RepoMeta

func (c *Client) RepoMeta(owner, repo string) (string, error)

RepoMeta fetches the description (about field) for a GitHub repo.

func (*Client) SearchByTopic

func (c *Client) SearchByTopic(term string) ([]SearchResult, error)

SearchByTopic queries the GitHub repository search API for repos tagged with the melon-skill topic that match term.

type SearchResult

type SearchResult struct {
	// Name is the installable GitHub path, e.g. "github.com/owner/repo".
	Name        string
	Description string
	Owner       string
}

SearchResult is a repository returned by the GitHub search API.

Jump to

Keyboard shortcuts

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