fix(worker): wrap MergeAbortAsync in AbortMergeAsync for consistent error handling
This commit is contained in:
@@ -216,7 +216,8 @@ public sealed class TaskMergeService
|
|||||||
if (!await _git.IsMidMergeAsync(list.WorkingDir, ct))
|
if (!await _git.IsMidMergeAsync(list.WorkingDir, ct))
|
||||||
return Blocked("repo is not mid-merge");
|
return Blocked("repo is not mid-merge");
|
||||||
|
|
||||||
await _git.MergeAbortAsync(list.WorkingDir, ct);
|
try { await _git.MergeAbortAsync(list.WorkingDir, ct); }
|
||||||
|
catch (Exception ex) { return Blocked($"abort failed: {ex.Message}"); }
|
||||||
_logger.LogInformation("Aborted merge of task {TaskId}", taskId);
|
_logger.LogInformation("Aborted merge of task {TaskId}", taskId);
|
||||||
|
|
||||||
return new MergeResult(StatusAborted, Array.Empty<string>(), null);
|
return new MergeResult(StatusAborted, Array.Empty<string>(), null);
|
||||||
|
|||||||
Reference in New Issue
Block a user