MCPcopy
hub / github.com/cli/cli / QualifiedHeadRef

Method QualifiedHeadRef

pkg/cmd/pr/shared/find_refs_resolution.go:96–98  ·  view source on GitHub ↗

QualifiedHeadRef returns a stringified form of the head ref, varying depending on whether the head ref is in the same repository as the base ref. If they are the same repository, we return the branch name only. If they are different repositories, we return the owner and branch name in the form <owne

()

Source from the content-addressed store, hash-verified

94// the same repository, we return the branch name only. If they are different repositories,
95// we return the owner and branch name in the form <owner>:<branch>.
96func (r PRFindRefs) QualifiedHeadRef() string {
97 return r.qualifiedHeadRef.String()
98}
99
100func (r PRFindRefs) UnqualifiedHeadRef() string {
101 return r.qualifiedHeadRef.BranchName()

Callers 2

TestPRFindRefsFunction · 0.95
MatchesMethod · 0.95

Calls 1

StringMethod · 0.45

Tested by 1

TestPRFindRefsFunction · 0.76