MCPcopy
hub / github.com/cli/cli / removeLegacyFromCodeloadPath

Function removeLegacyFromCodeloadPath

pkg/cmd/release/download/download.go:335–337  ·  view source on GitHub ↗

removeLegacyFromCodeloadPath converts URLs for "legacy" Codeload archives into ones that match the format when you choose to download "Source code (zip/tar.gz)" from a tagged release on the web. The legacy URLs look like this: https://codeload.github.com/OWNER/REPO/legacy.zip/refs/tags/TAGNAME Re

(p string)

Source from the content-addressed store, hash-verified

333//
334// Removing the "legacy." part results in a valid Codeload URL for our desired archive format.
335func removeLegacyFromCodeloadPath(p string) string {
336 return codeloadLegacyRE.ReplaceAllString(p, "$1")
337}
338
339var errSkipped = errors.New("skipped")
340

Callers 1

downloadAssetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected