MCPcopy Create free account
hub / github.com/cli/cli / removeLegacyFromCodeloadPath

Function removeLegacyFromCodeloadPath

pkg/cmd/release/download/download.go:371–373  ·  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

369//
370// Removing the "legacy." part results in a valid Codeload URL for our desired archive format.
371func removeLegacyFromCodeloadPath(p string) string {
372 return codeloadLegacyRE.ReplaceAllString(p, "$1")
373}
374
375var errSkipped = errors.New("skipped")
376

Callers 1

downloadAssetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected