Fetch all versions at once

This commit is contained in:
Nishtha Gupta
2022-12-29 14:43:48 +05:30
parent 7f4037254e
commit e95cd87648
3 changed files with 91 additions and 60 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ import {RestEndpointMethodTypes} from '@octokit/plugin-rest-endpoint-methods/dis
export interface RestVersionInfo {
id: number
version: string
created_at: string
}
export interface RestQueryInfo {
@@ -54,7 +55,8 @@ export function getOldestVersions(
versions: response.data.map((version: GetVersionsResponse[0]) => {
return {
id: version.id,
version: version.name
version: version.name,
created_at: version.created_at
}
}),
page: page + 1,