You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pull requests with more than 250 commits are only partially checked #308
Surfaced during review of the #302 fix series. Pre-existing, not a regression.
Problem
GitHub caps the commit list for a pull request at 250 commits, and pagination does not lift the cap. From the REST description of GET /repos/{owner}/{repo}/pulls/{pull_number}/commits:
Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the List commits endpoint.
The same 250 cap applies to commits[] on the compare endpoint we used previously, so this limitation predates the switch to pulls.listCommits.
Impact
For a pull request with more than 250 commits we evaluate only the first 250 and report a verdict as though we had seen all of them. A commit missing its Signed-off-by beyond commit 250 is never examined, so we can report a passing DCO check for a pull request that does not actually pass. A false pass is worse than a false failure here, because the whole point of the check is to be a gate.
Suggested fix
Two parts, and the first matters more than the second:
Detect the truncation and refuse to report a misleading pass. If the returned commit list is truncated, publish a result that says so explicitly rather than a green check.
Optionally, retrieve the full commit list so large pull requests can be evaluated properly. The paginated GraphQL PullRequest.commits connection is not subject to the 250 cap.
Even without part 2, part 1 removes the false-pass hazard.
Activity
Fix: Handle large PR commit lists