Repository navigation
Commit 0baddb1
Extract JSON from Copilot CLI response despite narration, fail visibly when missing
Copilot CLI's response file can include narration/thinking lines before
its final JSON answer (observed in run 32801440182), so the previous
fix (#596) silently discarded a perfectly good AI-generated changelog
because the whole file wasn't valid JSON.
Instead, extract the last line that looks like a JSON object and parse
just that. If no JSON object is found at all, fail the workflow
visibly with ::error:: instead of silently falling back to the generic
changelog entry.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent efb6221 commit 0baddb1
2 files changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
0 commit comments