Repository navigation
Commit 26284f0
Add GitHub Issues auto-tracking for regressions
Another large-scale improvement, same shape as --webhook-url: turn a
regression into something a team actually has to act on, rather than
a notification that scrolls off a Slack channel. --github-issues-repo
opens a tracking issue when a check goes to Fail, and closes it (with
a recovery comment) when the same check comes back to Pass. Warn never
opens, comments, or closes anything - it isn't a confirmed regression
either way, matching the existing Status semantics used everywhere
else in the codebase.
Deliberately built on history::diff, the same primitive notify.rs
already uses for regressions, rather than inventing a second notion
of "what changed" (src/issues.rs::events_from_history keeps every
transition, not just ->Fail, since Pass needs to close issues too).
Dedup uses a stable marker embedded in the issue body
(<!-- formwatch-issue-key: {url} | {check} -->, invisible in GitHub's
rendered view) as a search key, rather than hashing it - the raw text
is more debuggable and there's no need to obscure it. Token resolution
follows the same never-fail-the-run philosophy as the LLM/webhook
integrations: github_issues.token, then GITHUB_TOKEN (set automatically
in Actions), then GH_TOKEN (gh CLI's convention), then a logged warning
and skip.
Verified against the real voidstackloop/formwatch repo, not just unit
tests, which is what actually caught a genuine bug: GitHub's issue
search index is eventually consistent, so calling reconcile() twice in
quick succession (simulating two close monitor runs) created a second
issue instead of finding the first. Confirmed the race directly via
`gh api search/issues`, then fixed it with a bounded retry ([2s, 4s]
backoff) before falling back to create - re-verified live with a fresh
URL and got the correct Created -> AlreadyTracked -> Closed sequence,
independently double-checked via `gh issue view`.
cargo fmt/clippy -D warnings clean, full suite green (152 tests).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent beb86cb commit 26284f0
6 files changed
Lines changed: 733 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
27 | 44 | | |
28 | 45 | | |
29 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| |||
263 | 265 | | |
264 | 266 | | |
265 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
| |||
285 | 291 | | |
286 | 292 | | |
287 | 293 | | |
| 294 | + | |
288 | 295 | | |
289 | 296 | | |
290 | 297 | | |
| |||
371 | 378 | | |
372 | 379 | | |
373 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
374 | 407 | | |
375 | 408 | | |
376 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
63 | 91 | | |
64 | 92 | | |
65 | 93 | | |
| |||
144 | 172 | | |
145 | 173 | | |
146 | 174 | | |
| 175 | + | |
| 176 | + | |
147 | 177 | | |
148 | 178 | | |
149 | 179 | | |
| |||
242 | 272 | | |
243 | 273 | | |
244 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
245 | 286 | | |
246 | 287 | | |
247 | 288 | | |
| |||
0 commit comments