Documentation
¶
Overview ¶
Package prref parses and normalizes pull-request references.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchProvider ¶ added in v0.10.266
MatchProvider returns a usage-shaped error when a parsed PR URL's provider family does not match the configured git provider kind.
func ParseGitHubPullURL ¶
func ParseGitHubPullURL(raw string) (gitprovider.PRRef, error)
ParseGitHubPullURL parses the v1 GitHub pull-request URL form.
func ParseGitLabMergeRequestURL ¶ added in v0.10.266
func ParseGitLabMergeRequestURL(raw string) (gitprovider.PRRef, error)
ParseGitLabMergeRequestURL parses a GitLab merge-request URL. Both the canonical `/-/merge_requests/<iid>` form and the legacy form without the `/-/` separator are accepted, and namespaces may be nested, so the parsed owner can contain slashes (for example `group/subgroup`).
Types ¶
type Provider ¶ added in v0.10.266
type Provider string
Provider identifies the git-host URL family a pull-request reference was parsed from.
Providers recognized by ParsePullURL.
func ParsePullURL ¶ added in v0.10.266
func ParsePullURL(raw string) (gitprovider.PRRef, Provider, error)
ParsePullURL parses a GitHub pull-request URL or a GitLab merge-request URL and reports which provider family the URL belongs to.