Expand description
Shared GitHub Releases helpers.
Several loaders — GraalVM CE here, and the forge family once it ports — resolve their versions straight off GitHub Releases. Listing the releases and reading an asset’s digest live here so no resolver carries its own copy.
@opys/dev’s github.ts is still the JS spelling of this while the
forge-family loaders remain in TypeScript; it retires with them.
Structs§
- GitHub
Asset - A single asset on a release, mirroring the
/releasesAPI shape. - GitHub
Release - A single release entry from the
/releasesAPI.
Enums§
- GitHub
Error - Release
Selector - Which release to take off the listing.
Constants§
- GITHUB_
API_ BASE - Where the Releases API lives. Overridable per call so a resolver can point
at a GitHub Enterprise host or a mirror, matching the
api_basethe Adoptium and Azul resolvers already take.
Functions§
- fetch_
github_ release - Fetch the one release tagged
tag, by address rather than by listing. - github_
asset_ sha256 - The hex sha256 behind an asset’s
digestfield, when GitHub computed one. - list_
github_ releases - List all releases for
repo(owner/name), newest first — a single page of up to 100.tokenraises the rate limit. - pick_
github_ release - Fetch
repo’s releases and pick the one matchingselector. Drafts are always skipped;filterfurther narrows candidates first — use it when the loader needs specific assets present, soLatestfalls through to the newest release that actually qualifies. - pin_
github_ asset - An asset’s size and sha256, whatever it takes to know them.
- select_
github_ release - Apply a selector to an already-narrowed candidate list. Pure — the caller has done the draft/filter pass.