github

package
v0.3.0-20260812232155-... Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 5 Imported by: ? 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

This section is empty.

Functions

This section is empty.

Types

type ChangeID

type ChangeID struct {
	// Scheme captures the URI scheme (always "github" in current implementation).
	Scheme string
	// Host is the host or host:port of the GitHub instance the change lives
	// on, e.g. "github.example.com" or "github.example.com:8443".
	Host string
	// Org is the organization or owner of the repository.
	Org string
	// Repo is the repository name.
	Repo string
	// PRNumber is the pull request number.
	PRNumber int
	// HeadCommitSHA is the head commit SHA at the time of request creation.
	HeadCommitSHA string
}

ChangeID represents a parsed GitHub change identifier. The authority names the GitHub instance the change lives on, so github.com, GitHub Enterprise, and GitHub Enterprise Server all parse under the single "github" scheme. Format: github://{host[:port]}/{owner}/{repo}/pull/{pr_number}/{head_commit_sha}

func ParseChangeID

func ParseChangeID(raw string) (ChangeID, error)

ParseChangeID parses a raw change ID string into a ChangeID. Expected format: github://{host[:port]}/{owner}/{repo}/pull/{pr_number}/{head_commit_sha} The parser works from the end: SHA (last), PR number (second-to-last), the literal "pull" segment (third-to-last), and everything before is the repo path (split into owner and repo).

func (ChangeID) OwnerRepo

func (c ChangeID) OwnerRepo() string

OwnerRepo returns the "{org}/{repo}" string.

func (ChangeID) String

func (c ChangeID) String() string

String returns the string representation of the change ID.

Jump to

Keyboard shortcuts

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