Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kylannjohnson opened this issue Apr 29, 2024 · 3 comments
Labels

Comments

@kylannjohnson
Copy link

kylannjohnson commented Apr 29, 2024

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

@stewartlord
Copy link

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

@kylannjohnson
Copy link
Author

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

@srt32 srt32 added the feature label May 20, 2024
@srt32
Copy link
Member

srt32 commented May 20, 2024

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

@srt32 srt32 closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants