fix(worker): guard blank working dir in approve-merge before resolving target
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -267,6 +267,9 @@ public sealed class TaskMergeService
|
|||||||
: Blocked(done.Reason ?? "approve failed");
|
: Blocked(done.Reason ?? "approve failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(list.WorkingDir))
|
||||||
|
return Blocked("list has no working directory");
|
||||||
|
|
||||||
var target = string.IsNullOrWhiteSpace(targetBranch)
|
var target = string.IsNullOrWhiteSpace(targetBranch)
|
||||||
? await _git.GetCurrentBranchAsync(list.WorkingDir, ct)
|
? await _git.GetCurrentBranchAsync(list.WorkingDir, ct)
|
||||||
: targetBranch;
|
: targetBranch;
|
||||||
|
|||||||
Reference in New Issue
Block a user