Let the agent set the merge commit title, defaulting to the task title
This commit is contained in:
Vendored
+1
@@ -130,6 +130,7 @@ export function handleEvent(ev) {
|
||||
void loadProjects();
|
||||
break;
|
||||
case "task.created":
|
||||
case "task.merge_title":
|
||||
case "task.merged":
|
||||
case "task.discarded":
|
||||
if (ev.project_id) {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3
-1
@@ -93,7 +93,7 @@ export function mountTranscript(root) {
|
||||
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, title: `The agent merges ${target} in, then byre squashes into one commit on ${target}; nothing is pushed` }, "Merge");
|
||||
merge.onclick = () => confirmChanges(task, (u) => `Merge "${task.title}" into ${target}? The agent first merges ${target} in and resolves any conflicts; when that turn ends, ${changesText(u)} become one commit on ${target} and the task closes. Nothing is pushed.`, async () => {
|
||||
merge.onclick = () => confirmChanges(task, (u) => `Merge "${task.title}" into ${target}? The agent first merges ${target} in and resolves any conflicts; when that turn ends, ${changesText(u)} become one commit on ${target} titled "${task.merge_title}", and the task closes. Nothing is pushed.`, async () => {
|
||||
await post("/api/tasks/{taskId}/merge", { path: { taskId: task.id } });
|
||||
});
|
||||
const mergeIn = h("button", { disabled: busy, title: `Ask the agent to merge ${target} into this branch and resolve any conflicts` }, `Merge ${target} in`);
|
||||
@@ -604,6 +604,8 @@ function renderEvent(ev, ctx) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case "task.merge_title":
|
||||
return h("div", { class: "note" }, `${ev.actor} set the merge commit title to "${String(p["merge_title"])}" `, when);
|
||||
case "task.merged":
|
||||
return h("div", { class: "note" }, `${ev.actor} merged the task${p["commit"] ? ` as ${String(p["commit"]).slice(0, 7)}` : ""} `, when);
|
||||
case "task.discarded":
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+3
-1
@@ -121,7 +121,7 @@ export interface paths {
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
/** @description Starts the same agent turn as merge-in. When that turn ends normally, byre squashes the task's worktree into one commit on the project's default branch, fast-forwards the project's checkout to it, then removes the worktree and branch and marks the task merged. Nothing is pushed. Refused while a turn is running or queued. */
|
||||
/** @description Starts the same agent turn as merge-in. When that turn ends normally, byre squashes the task's worktree into one commit titled with the task's merge_title on the project's default branch, fast-forwards the project's checkout to it, then removes the worktree and branch and marks the task merged. Nothing is pushed. Refused while a turn is running or queued. */
|
||||
post: operations["mergeTask"];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
@@ -473,6 +473,8 @@ export interface components {
|
||||
id: string;
|
||||
project_id: string;
|
||||
title: string;
|
||||
/** @description The title of the squash commit Merge makes: the task title until the agent sets another with set_merge_title. */
|
||||
merge_title: string;
|
||||
branch: string;
|
||||
worktree_path: string;
|
||||
base_ref: string;
|
||||
|
||||
@@ -152,6 +152,7 @@ export function handleEvent(ev: ByreEvent): void {
|
||||
void loadProjects();
|
||||
break;
|
||||
case "task.created":
|
||||
case "task.merge_title":
|
||||
case "task.merged":
|
||||
case "task.discarded":
|
||||
if (ev.project_id) {
|
||||
|
||||
+4
-1
@@ -125,7 +125,7 @@ export function mountTranscript(root: HTMLElement): () => void {
|
||||
confirmChanges(
|
||||
task,
|
||||
(u) =>
|
||||
`Merge "${task.title}" into ${target}? The agent first merges ${target} in and resolves any conflicts; when that turn ends, ${changesText(u)} become one commit on ${target} and the task closes. Nothing is pushed.`,
|
||||
`Merge "${task.title}" into ${target}? The agent first merges ${target} in and resolves any conflicts; when that turn ends, ${changesText(u)} become one commit on ${target} titled "${task.merge_title}", and the task closes. Nothing is pushed.`,
|
||||
async () => {
|
||||
await post("/api/tasks/{taskId}/merge", { path: { taskId: task.id } });
|
||||
},
|
||||
@@ -700,6 +700,9 @@ function renderEvent(ev: ByreEvent, ctx: Ctx): HTMLElement | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
case "task.merge_title":
|
||||
return h("div", { class: "note" }, `${ev.actor} set the merge commit title to "${String(p["merge_title"])}" `, when);
|
||||
|
||||
case "task.merged":
|
||||
return h("div", { class: "note" }, `${ev.actor} merged the task${p["commit"] ? ` as ${String(p["commit"]).slice(0, 7)}` : ""} `, when);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user