github

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package github implements the forge.Forge interface backed by google/go-github. It maps GitHub REST API responses to the normalized domain types defined in the parent forge package, translating GitHub's scoped-label naming convention (scope:name) to the two-argument model used at the CLI boundary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelFullName

func LabelFullName(scope, name string) string

LabelFullName joins scope and name into a GitHub-style label name. If scope is empty, returns name unchanged. Otherwise returns "scope:name".

func ParseLabelScope

func ParseLabelScope(fullName string) (scope, name string)

ParseLabelScope splits a GitHub label name like "kind:bug" into (scope="kind", name="bug"). For labels without a colon, scope is empty and name is the full label name.

Types

type Forge

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

Forge is a GitHub implementation of the forge.Forge interface.

func New

func New(host, owner, repo string, httpClient *http.Client) *Forge

New creates a new GitHub Forge adapter. host is the forge host (e.g., "github.com", or "http://127.0.0.1:8080" for testing). owner and repo identify the repository. httpClient is used for authentication — attach a token via an oauth2.StaticTokenSource transport or set the Authorization header. For GitHub Enterprise, host must be the enterprise domain and New will configure the API base URL accordingly.

func (*Forge) Issues

func (f *Forge) Issues() forge.IssueService

Issues returns the IssueService for this forge.

func (*Forge) Labels

func (f *Forge) Labels() forge.LabelService

Labels returns the LabelService for this forge.

func (*Forge) PRs

func (f *Forge) PRs() forge.PRService

PRs returns the PRService for this forge.

Jump to

Keyboard shortcuts

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