Skip to content

Commit 52794ea

Browse files
committed
fix(12-01): fix PostFailureCommentAsync body construction (remove raw string literal, use string concatenation)
1 parent 10975db commit 52794ea

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

src/GsdOrchestrator/Workflows/GsdStateMachine.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,12 @@ private async Task PostFailureCommentAsync(GsdWorkflowContext ctx, CancellationT
119119
if (ctx.Issue is null) return;
120120
try
121121
{
122-
var body = $""" 🤖 **GSD Orchestrator failed**
123-
124-
Last state: `{ctx.History.LastOrDefault()?.From}`
125-
Reason: {ctx.FailureReason ?? "Unknown error"}
126-
127-
The workflow checkpoint is saved for debugging. Resume with:
128-
```
129-
dotnet run -- --resume {ctx.WorkflowId}
130-
```
131-
""";
122+
var body = string.Create(System.Globalization.CultureInfo.InvariantCulture,
123+
$"🤖 **GSD Orchestrator failed**\n\n"
124+
+ $"Last state: `{ctx.History.LastOrDefault()?.From}`\n"
125+
+ $"Reason: {ctx.FailureReason ?? "Unknown error"}\n\n"
126+
+ $"The workflow checkpoint is saved for debugging. Resume with:\n"
127+
+ $"```\ndotnet run -- --resume {ctx.WorkflowId}\n```");
132128

133129
await _mcp.CallAsync("add_issue_comment", new System.Text.Json.Nodes.JsonObject
134130
{

0 commit comments

Comments
 (0)