MCPcopy Create free account
hub / github.com/github/gh-aw / isBranchRef

Function isBranchRef

pkg/cli/update_workflows.go:834–836  ·  view source on GitHub ↗

isBranchRef returns true when the ref is a branch name — i.e. it is neither a semantic-version tag nor a full commit SHA.

(ref string)

Source from the content-addressed store, hash-verified

832// isBranchRef returns true when the ref is a branch name — i.e. it is
833// neither a semantic-version tag nor a full commit SHA.
834func isBranchRef(ref string) bool {
835 return !isSemanticVersionTag(ref) && !IsCommitSHA(ref)
836}
837
838// shortRef abbreviates a ref for display. Commit SHAs are truncated to 7 characters;
839// other refs (branch names, tags) are returned as-is.

Callers 3

TestIsBranchRefFunction · 0.85

Calls 2

isSemanticVersionTagFunction · 0.85
IsCommitSHAFunction · 0.85

Tested by 1

TestIsBranchRefFunction · 0.68