MCPcopy Index your code
hub / github.com/anomalyco/opencode / ref

Function ref

script/raw-changelog.ts:46–51  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

44} as const
45
46function ref(input: string) {
47 if (input === "HEAD") return input
48 if (input.startsWith("v")) return input
49 if (input.match(/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/)) return `v${input}`
50 return input
51}
52
53async function latest() {
54 const data = await $`gh api "/repos/${repo}/releases?per_page=100"`.json()

Callers 4

commitsFunction · 0.70
contributorsFunction · 0.70
publishedFunction · 0.70
formatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected