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 source variant (e.g., "github", "ghe", "ghes").
Scheme 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-family change identifier. Covers GitHub.com, GitHub Enterprise (GHE), and GitHub Enterprise Server (GHES) since they share the same pull request model. Format: {scheme}://{owner}/{repo}/pull/{pr_number}/{head_commit_sha}
func ParseChangeID ¶
ParseChangeID parses a raw change ID string into a ChangeID. Expected format: {scheme}://{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).
Click to show internal directories.
Click to hide internal directories.