Skip to content

[Schema Inaccuracy] Compare Endpoint pagination for 'files' list #3975

Description

@tamershahin

Schema Inaccuracy

There is a misalignment between what is visible on the website for any compare:

image

and what you can get from the Rest API

{{baseUrl}}/repos/:owner/:repo/compare/:basehead?page=1&per_page=100

The info about 'Files Changes', 'addition', 'deletes' cannot be obtained at all via the Rest API when you have more than 300 changed files in one compare set.

The description says: "The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison."

but how is that accurate or reflecting info available on the website?

Expected

to be able to fetch all changed file in this call or with a subpath e.g. {{baseUrl}}/repos/:owner/:repo/compare/:basehead/files?page=1&per_page=100

Reproduction Steps

Include steps to reproduce the problem with the description. For example:

curl --location 'https://api.github.com/repos/owner/:repo/compare/:basehead?page=1&per_page=200'
--header 'Accept: application/vnd.github+json'
--header 'X-GitHub-Api-Version: 2022-11-28'
--header 'Authorization: Bearer ****'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions