frontend/.pnpm-store/v3/files/b5/765b29c0a1ca2ec48c8fd32e5532a81c82377474fb939bc87f438311fc691db264d37c4587928c983806becbf817d4e3ac420eeb390c67d240986b107de53e

19 lines
1.1 KiB
Plaintext

/**
* Some “list” response that can be paginated have a different response structure
*
* They have a `total_count` key in the response (search also has `incomplete_results`,
* /installation/repositories also has `repository_selection`), as well as a key with
* the list of the items which name varies from endpoint to endpoint.
*
* Octokit normalizes these responses so that paginated results are always returned following
* the same structure. One challenge is that if the list response has only one page, no Link
* header is provided, so this header alone is not sufficient to check wether a response is
* paginated or not.
*
* We check if a "total_count" key is present in the response data, but also make sure that
* a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
*/
import { OctokitResponse } from "./types";
export declare function normalizePaginatedListResponse(response: OctokitResponse<any>): OctokitResponse<any>;