refURLEscape escapes every path segment of the given ref. Those must not contain escaped "/" - as "%2F" - or github will not recognize it.
(ref string)
| 75 | // refURLEscape escapes every path segment of the given ref. Those must |
| 76 | // not contain escaped "/" - as "%2F" - or github will not recognize it. |
| 77 | func 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. |
no outgoing calls
no test coverage detected
searching dependent graphs…