Skip to content

[Schema Inaccuracy] Comparison API doesn't list all files in first page, per docs #3552

Closed
@kylannjohnson

Description

@kylannjohnson

Schema Inaccuracy

If I summarize https://api.github.com/repos/OWNER/REPO/compare/TAG1...TAG2?page=1&per_page=100 and compare it to its html equivalent, the html page gives 812 file changed with 4889 changes.

As expected, when I implement paging, I get 9 pages, but the first page is incorrect:

Comparison --
Page: total files: 300, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 6

Expected

According to the docs for comparison, "The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison"

To Reproduce

I just used the paging API per the docs. I consume the link header on each response and, starting with 1, increment the page query parameter as long as next returns true in the header value

Activity

stewartlord

stewartlord commented on Apr 30, 2024

@stewartlord

@github/repos Should we transfer this to your team?

kylannjohnson

kylannjohnson commented on May 2, 2024

@kylannjohnson
Author

I'm happy to repost to @github/repos if that's more appropriate

srt32

srt32 commented on May 20, 2024

@srt32
Member

Thanks! We've got this ask tracked internally now.

tamershahin

tamershahin commented on Sep 6, 2024

@tamershahin

this is still happening to me.. has been fixed or not?

Jasonradford51

Jasonradford51 commented on Jan 27, 2025

@Jasonradford51

rM3JY6rE595QxiS3zi3Vb4Qyy5sCfuhfcr

Jasonradford51

Jasonradford51 commented on Jan 27, 2025

@Jasonradford51

Duplicate of #4421

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @stewartlord@kylannjohnson@srt32@tamershahin@Jasonradford51

        Issue actions

          [Schema Inaccuracy] Comparison API doesn't list all files in first page, per docs · Issue #3552 · github/rest-api-description