Skip to content

[BUG]: total_count missing from paginated response types #652

Closed
@robertbrignull

Description

@robertbrignull

What happened?

In https://github.com/github/vscode-codeql/blob/main/extensions/ql-vscode/src/databases/code-search-api.ts we're using octokit.paginate.iterator(octokit.rest.search.code) and on the response we're checking response.data.total_count. In the upgrade from 21.0.2 to 21.1.0 this field seems to have disappeared. It's still there in the response from GitHub (i.e. making the request with curl) but it gets deleted before it reaches our code.

We're wondering if this change came from #637 but we're not sure and also check if this was an intentional effect or not. Alternatively, is there another recommended way to access the total_count field?

Versions

@octokit/rest v21.1.0

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as documentedreleasedtypescriptRelevant to TypeScript users only

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions