Skip to content
New issue

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

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

Already on GitHub? # to your account

[Schema Inaccuracy] List organization repositories sorting #3445

Open
dmmatson opened this issue Mar 5, 2024 · 1 comment
Open

[Schema Inaccuracy] List organization repositories sorting #3445

dmmatson opened this issue Mar 5, 2024 · 1 comment

Comments

@dmmatson
Copy link

dmmatson commented Mar 5, 2024

Schema Inaccuracy

List organization repositories
get "/organizations/:organization_id/repos"

Expected

There are two issues with this description...

      description: The property to sort the results by.
        in: query
        required: false
        schema:
          type: string
          enum:
          - created
          - updated
          - pushed
          - full_name
          default: created

We also support sorting by name. [code]

    - name: direction
        description: 'The order to sort by. Default: `asc` when using `full_name`,
          otherwise `desc`.'
        in: query
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc

The fields that sort in ASC order are full_name, id, and name. [code]

Reproduction Steps

GH_DEBUG=1 gh api -X GET --jq ".[].name" "https://api.github.com/orgs/github/repos?sort=name&per_page=100"

@dmmatson
Copy link
Author

dmmatson commented Mar 5, 2024

I don't believe there is any behavioral difference between sorting by full_name vs. name since in the context of an organization the prefix will always be the same, e.g. github/REPO.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants