Skip to content

[Schema Inaccuracy] GET /repos/{owner}/{repo}/commits can respond with 409 if repository is empty #385

Closed

Description

@gr2m

Schema Inaccuracy

the responses key for GET /repos/{owner}/{repo}/commits is lacking a 409 key.

Reported by @chalenge in octokit/plugin-paginate-rest.js#158

Reproduction Steps

 ➜ curl -i https://api.github.com/repos/gr2m/empty-repo-for-testing/commits
HTTP/2 409 
server: GitHub.com
# ...

{
  "message": "Git Repository is empty.",
  "documentation_url": "https://docs.github.com/rest/reference/repos#list-commits"
}

Activity

  1. mattpage commented on Jul 21, 2021

    @mattpage
    Contributor

    @gr2m - the title of this issue says */contributors which would be the list-contributors operation but the reproduction steps are for the list-commits operation. Would you mind clarifying?

  2. changed the title [-][Schema Inaccuracy] `GET /repos/{owner}/{repo}/contributors` can respond with 409 if repository is empty[/-] [+][Schema Inaccuracy] `GET /repos/{owner}/{repo}/commits` can respond with 409 if repository is empty[/+] on Jul 21, 2021
  3. gr2m commented on Jul 21, 2021

    @gr2m
    ContributorAuthor

    I mixed up the two endpoints that were mentioned in octokit/plugin-paginate-rest.js#158. I fixed the issue title and description now

  4. mattpage commented on Jul 21, 2021

    @mattpage
    Contributor

    list-commits currently has a 409 response, so I am going to close this issue. If you feel that the issue was closed by mistake or have more information, feel free to reopen.

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