import { Octokit } from "@octokit/rest" ; import { Version } from "../../common/Objects/Version" ; param { string } token param { Octokit } initiated returns { Version } export async function getLatestRelease ( octokit ) { const latestRelease = await octokit . repos . getLatestRelease ( { owner : "PACKED-vzw" , repo : "CultURIze" , } ) ; const versionTag = latestRelease . data . tag_name . substring ( 1 ) ; const version = new Version ( versionTag ) ; return version ; } export async function getDefaultBranch ( octokit , repoOwner , repoName ) { const repo = await octokit . repos . get ( { owner : repoOwner , repo : repoName , } ) ; return repo . data . default_branch ; }