diff --git a/utils.ts b/utils.ts index 7a5dd07..0bc6556 100644 --- a/utils.ts +++ b/utils.ts @@ -1,3 +1,5 @@ +import { repoOwner, repoName } from "./constants"; + export const runtime: "bun" | "deno" | undefined = typeof Bun !== "undefined" ? "bun" : typeof Deno !== "undefined" @@ -108,3 +110,7 @@ export async function getBranchName() { // There is a newline at the end, I will use backslash to split the string return branchName.output.split("\\")[0]; } + +export function pvsUrl(ui: any, branch: string, filename: string) { + return `https://raw.githubusercontent.com/${repoOwner}/${repoName}/refs/heads/${branch}/scripts/${ui.id}/${filename}.sh`; +}