From bb02caca6a4a855f3fd55a4a5c80654722f2be63 Mon Sep 17 00:00:00 2001 From: xynydev <60004820+xynydev@users.noreply.github.com> Date: Wed, 27 Mar 2024 19:01:19 +0200 Subject: [PATCH] fix: remove boot menu edit --- src/components/ImageChooser/CreateRepo.svelte | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/src/components/ImageChooser/CreateRepo.svelte b/src/components/ImageChooser/CreateRepo.svelte index 9f5814a..6772bde 100644 --- a/src/components/ImageChooser/CreateRepo.svelte +++ b/src/components/ImageChooser/CreateRepo.svelte @@ -249,46 +249,6 @@ log += "Recipe updated successfully! \n"; } - const bootMenuRes = await fetch( - `https://api.github.com/repos/${custom.repo}/contents/boot_menu.yml`, - { - method: "get", - headers: { Authorization: `Bearer ${custom.auth}` }, - } - ); - const bootMenuJson = await bootMenuRes.json(); - if (!bootMenuRes.ok) { - log += "Error getting boot menu: \n"; - log += JSON.stringify(bootMenuJson); - log += "\n"; - } else { - log += "Boot menu got successfully! \n"; - } - const bootMenu = String(atob(bootMenuJson.content)); - - const bootMenuYml = YAML.parseDocument(bootMenu); - bootMenuYml.contents.deleteIn(['ublue_variants', 0]) - bootMenuYml.contents.addIn(['ublue_variants'], { label: custom.repo?.toLowerCase(), ks: '/kickstart/ublue-os.ks', flavors: [{ label: custom.name }] }) - - const bootMenuUpdateRes = await fetch( - `https://api.github.com/repos/${custom.repo}/contents/boot_menu.yml`, - { - method: "put", - headers: { Authorization: `Bearer ${custom.auth}` }, - body: JSON.stringify({ - message: - "chore(automatic): update boot_menu to match image", - content: btoa(YAML.stringify(bootMenuYml)), - sha: bootMenuJson.sha, - }), - } - ); - if (!bootMenuUpdateRes.ok) { - log += "Error updating boot menu. \n"; - } else { - log += "Boot menu updated successfully! \n"; - } - const workflowRes = await fetch( `https://api.github.com/repos/${custom.repo}/actions/permissions`, {