Merge explains why it did nothing
This commit is contained in:
Vendored
+10
-1
@@ -933,7 +933,15 @@ function messageImages(ids) {
|
||||
export async function confirmMerge(taskId) {
|
||||
const task = findTask(taskId);
|
||||
const sessionState = currentSession(taskId)?.state;
|
||||
if (!task || task.status !== "active" || task.merge_queued_at !== undefined || sessionState === "running") {
|
||||
if (!task || task.status !== "active") {
|
||||
return;
|
||||
}
|
||||
if (sessionState === "running") {
|
||||
void showAlert("Agent is mid-turn; merge when it's idle");
|
||||
return;
|
||||
}
|
||||
if (task.merge_queued_at !== undefined) {
|
||||
void showAlert("Merge already held behind another merge in this project");
|
||||
return;
|
||||
}
|
||||
const target = state.projects.find((p) => p.id === task.project_id)?.default_branch ?? "the default branch";
|
||||
@@ -944,6 +952,7 @@ export async function confirmMerge(taskId) {
|
||||
get("/api/tasks/{taskId}/co-authors", { path: { taskId } }),
|
||||
]);
|
||||
if (unmerged.commits === 0 && unmerged.files === 0) {
|
||||
void showAlert(`Nothing to merge: no commits or uncommitted files differ from ${target}`);
|
||||
return;
|
||||
}
|
||||
coAuthors = people;
|
||||
|
||||
Reference in New Issue
Block a user