MCPcopy Index your code
hub / github.com/cli/cli / removeLegacyFromCodeloadPath

Function removeLegacyFromCodeloadPath

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

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

Callers 1

downloadAssetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected