Skip to content

Pull requests with more than 250 commits are only partially checked #308

Closed

Description

@tykeal

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:

  1. 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.
  2. 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.

Related

Activity

  1. added a commit that references this issue on Jul 29, 2026
    de0c47e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions