Commit 5e1a2f0
Fix critical GitHub API pagination bugs in auto-merge workflow
This fixes a severe bug where the auto-merge workflow only checked the
first 30 commit statuses, causing it to miss failures and incorrectly
merge PRs with failing checks.
Root cause analysis:
- PR #5578 had 2 failed GB200 tests at 23:23-23:25 UTC
- By 03:29 UTC, 27+ new successful statuses pushed failures past position 30
- Workflow only fetched first page (30 items), saw 0 failures, and merged
Fixed 4 critical pagination issues:
1. listCommitStatusesForRef (line 140) - CRITICAL: Only saw 30 of 57 statuses
2. checks.listForRef (line 173) - Could miss failed checks if >30 exist
3. issues.listComments (line 349) - Wouldn't find status comment if >30 comments
4. pulls.list (line 64) - Could miss PR if >30 open PRs on branch
All API calls now use github.paginate() to retrieve complete results.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent abbbf4e commit 5e1a2f0
1 file changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| |||
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
348 | | - | |
| 349 | + | |
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
| |||
0 commit comments