Skip to content

Only gets first page of labels (during copy, list, etc) #16

Description

@agilgur5

Description

The API call on this line:

url: 'https://api.github.com/repos/' + username + '/' + repo + '/labels',

only gets the first page of labels. Per the API docs, you can use ?page=2 to get the second page etc.

Reproduction

You can see an example of this in some of my repos, e.g.:

Solutions

Per the docs, the link header can be parsed to get the next (or previous) page as well as the last page. Though a simpler method may be to just try a new page until the response is an empty array [], which would also indicate there are no more pages

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions