Hold a task's merge while another task in the project is merging
This commit is contained in:
Vendored
+9
-1
@@ -75,7 +75,13 @@ function taskHead(rerender) {
|
||||
}
|
||||
const target = state.projects.find((p) => p.id === task.project_id)?.default_branch ?? "the default branch";
|
||||
const busy = sess?.state === "running" || sess?.state === "queued";
|
||||
const merge = h("button", { disabled: busy || unmerged?.taskId !== task.id || !unmerged.has, title: `The agent merges ${target} in, then byre squashes into one commit on ${target} and pushes it to origin` }, "Merge");
|
||||
const held = task.merge_queued_at !== undefined;
|
||||
const merge = h("button", {
|
||||
disabled: busy || held || unmerged?.taskId !== task.id || !unmerged.has,
|
||||
title: held
|
||||
? "Waiting for the merge in progress in this project to finish"
|
||||
: `The agent merges ${target} in, then byre squashes into one commit on ${target} and pushes it to origin; held while another task in the project is merging`,
|
||||
}, held ? "Merge held" : "Merge");
|
||||
merge.onclick = async () => {
|
||||
let coAuthors;
|
||||
try {
|
||||
@@ -848,6 +854,8 @@ function renderEvent(ev, ctx) {
|
||||
}
|
||||
case "task.merge_title":
|
||||
return h("div", { class: "note" }, `${ev.actor} set the merge commit title to "${String(p["merge_title"])}" `, when);
|
||||
case "task.merge_queued":
|
||||
return h("div", { class: "note" }, `${ev.actor} asked to merge; held until the merge in progress in this project is done `, when);
|
||||
case "setup.started": {
|
||||
const base = Number(p["port_base"]);
|
||||
return h("div", { class: "note" }, `running ${String(p["script"])} with ports ${base}–${base + 9} `, when);
|
||||
|
||||
Reference in New Issue
Block a user