gh

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	Owner string
	Name  string
	Token
}

func NewRepo

func NewRepo(owner, repo, token string) Repo

func (Repo) CloneURL added in v0.9.1

func (r Repo) CloneURL() string

func (Repo) DownloadFile added in v0.9.1

func (r Repo) DownloadFile(ctx context.Context, httpClient *http.Client, path, ref string) ([]byte, int, error)

DownloadFile fetches the raw content of a file from GitHub at a specific ref (commit SHA or branch). Returns the file content bytes, the HTTP status code, and any error.

func (Repo) GetAllPullRequests

func (r Repo) GetAllPullRequests(state string) (*[]github.PullRequest, error)

func (Repo) GetLabelsFor

func (r Repo) GetLabelsFor(number int) (*[]string, error)

func (Repo) ListAllPullRequestFiles added in v0.9.1

func (r Repo) ListAllPullRequestFiles(pri int, cb func([]*github.CommitFile, *github.Response) error) error

func (Repo) ListAllPullRequests

func (r Repo) ListAllPullRequests(state string, cb func([]*github.PullRequest, *github.Response) error) error

func (Repo) PrURL

func (r Repo) PrURL(pr int) string

type Token

type Token struct {
	Token *string
}

func (Token) NewClient

func (t Token) NewClient() (*github.Client, context.Context)

Jump to

Keyboard shortcuts

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