MCPcopy
hub / github.com/cli/cli / NewQualifiedHeadRef

Function NewQualifiedHeadRef

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

NewQualifiedHeadRef creates a QualifiedHeadRef. If the empty string is provided for the owner, it will be treated as None.

(owner string, branchName string)

Source from the content-addressed store, hash-verified

30// NewQualifiedHeadRef creates a QualifiedHeadRef. If the empty string is provided
31// for the owner, it will be treated as None.
32func NewQualifiedHeadRef(owner string, branchName string) QualifiedHeadRef {
33 return QualifiedHeadRef{
34 owner: o.SomeIfNonZero(owner),
35 branchName: branchName,
36 }
37}
38
39func NewQualifiedHeadRefWithoutOwner(branchName string) QualifiedHeadRef {
40 return QualifiedHeadRef{

Callers 4

Test_isSameRefFunction · 0.92
NewCreateContextFunction · 0.92
ParseQualifiedHeadRefFunction · 0.85

Calls

no outgoing calls

Tested by 1

Test_isSameRefFunction · 0.74