diff --git a/dashboard/builds.html b/dashboard/builds.html index 0e3e1544..7e57f6dc 100644 --- a/dashboard/builds.html +++ b/dashboard/builds.html @@ -176,6 +176,31 @@

FHIR IG Builds

}) } + const deleted = [] + function deleteBranch(branchnum, org, repo, branch) { + if (deleted.includes(branchnum)) { + return; + } + if (!confirm(`Delete branch "${branch}" from ${org}/${repo}? This cannot be undone.`)) { + return; + } + deleted.push(branchnum) + document.getElementById(`delete-branch-${branchnum}`).classList.add("text-muted"); + fetch("https://us-central1-fhir-org-starter-project.cloudfunctions.net/ig-commit-trigger", { + body: JSON.stringify({ + "action": "delete", + "ref": `refs/heads/${branch}`, + "repository": {"full_name": `${org}/${repo}`} + }), + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', + referrer: 'no-referrer', + mode: 'cors' + }) + } + function render({builds, qas}){ const sorter = (a, b) => { @@ -252,14 +277,22 @@

FHIR IG Builds

${date ? timeFormatter.format(date) : "???"} ${success ? "success" : "failure"} - -