Repository navigation
Commit e2bc30a
fix(fetcher): preserve requested shape in github_action_status no-runs path
`github_action_status` advertises Badge / Text / Entries, but when the
`workflow_runs` list came back empty the fetcher always returned a `Body::Badge`
with `"no runs"`, regardless of `ctx.shape`. Consumers asking for Text or
Entries got a shape mismatch and the runtime fell through to the placeholder.
Extract a `no_runs_body(shape)` helper that mirrors the populated `render_body`
shape selection so each advertised shape stays consistent across the "have
runs" and "no runs" branches. Adds a unit test covering all three shapes.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 9ede219 commit e2bc30a
1 file changed
Lines changed: 41 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 100 | + | |
103 | 101 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
108 | 122 | | |
109 | 123 | | |
110 | 124 | | |
| |||
335 | 349 | | |
336 | 350 | | |
337 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
338 | 371 | | |
339 | 372 | | |
340 | 373 | | |
| |||
0 commit comments