mirror of
https://github.com/nearai/ironclaw.git
synced 2026-09-03 08:06:01 +08:00
Extends the nightly alert script to look up the previous successful run of the same workflow on the same branch, walk the commits in between via the GitHub compare API, and resolve each commit's associated merged PR. The failure issue now renders a "Merged since last green" section that @-mentions every PR author in the blame window, so a real human gets a notification instead of just a dashboard. All API calls are best-effort: missing baseline (first run, retention cliff, missing scopes) renders an inline note and the rest of the alert body still posts. PRs are deduped across multiple commits and capped via ALERT_MAX_MERGED_PRS (default 30) to keep issue bodies bounded. Tested via .github/scripts/nightly-alert-issue.test.sh — three new cases: collect_merged_prs happy path with cross-commit dedupe, no-baseline graceful fallback, and write_failure_body section render. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>