MCPcopy Index your code
hub / github.com/google/go-github / refURLEscape

Function refURLEscape

github/git_refs.go:77–83  ·  view source on GitHub ↗

refURLEscape escapes every path segment of the given ref. Those must not contain escaped "/" - as "%2F" - or github will not recognize it.

(ref string)

Source from the content-addressed store, hash-verified

75// refURLEscape escapes every path segment of the given ref. Those must
76// not contain escaped "/" - as "%2F" - or github will not recognize it.
77func refURLEscape(ref string) string {
78 parts := strings.Split(ref, "/")
79 for i, s := range parts {
80 parts[i] = url.PathEscape(s)
81 }
82 return strings.Join(parts, "/")
83}
84
85// ListMatchingRefs lists references in a repository that match a supplied ref.
86// The ref in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags.

Callers 10

GetCommitSHA1Method · 0.85
ListCheckRunsForRefMethod · 0.85
ListCheckSuitesForRefMethod · 0.85
GetRefMethod · 0.85
ListMatchingRefsMethod · 0.85
UpdateRefMethod · 0.85
DeleteRefMethod · 0.85
ListStatusesMethod · 0.85
CreateStatusMethod · 0.85
GetCombinedStatusMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…