Skip to content

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

@gr2m

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"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions