From e80cb287604cbfa4e50ac5ef9b27bb873d3140c4 Mon Sep 17 00:00:00 2001 From: Louis Knight-Webb Date: Fri, 20 Jun 2025 18:31:14 +0100 Subject: [PATCH] Task attempt e8e8210d-73d4-4c58-8c9a-6e907ebb2371 - Final changes --- backend/src/models/task_attempt.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/models/task_attempt.rs b/backend/src/models/task_attempt.rs index 54b65c72..2b0fc8de 100644 --- a/backend/src/models/task_attempt.rs +++ b/backend/src/models/task_attempt.rs @@ -296,6 +296,7 @@ impl TaskAttempt { worktree_path: &str, main_repo_path: &str, attempt_id: Uuid, + task_title: &str, ) -> Result { // Open the worktree repository let worktree_repo = Repository::open(worktree_path)?; @@ -369,7 +370,7 @@ impl TaskAttempt { let worktree_commit = main_repo.find_commit(worktree_branch_commit.id())?; let merge_commit_message = - format!("Merge task attempt {} into {}", attempt_id, main_branch); + format!("Merge task: {} into {}", task_title, main_branch); let merge_commit_id = main_repo.commit( Some(&main_branch_ref), &signature, @@ -415,7 +416,7 @@ impl TaskAttempt { .ok_or(TaskAttemptError::TaskNotFound)?; // Get the task and project - let _task = Task::find_by_id(pool, task_id) + let task = Task::find_by_id(pool, task_id) .await? .ok_or(TaskAttemptError::TaskNotFound)?; @@ -428,6 +429,7 @@ impl TaskAttempt { &attempt.worktree_path, &project.git_repo_path, attempt_id, + &task.title, )?; // Update the task attempt with the merge commit