diff --git a/src/apps/stats.ts b/src/apps/stats.ts index c26de3e3..47ead418 100644 --- a/src/apps/stats.ts +++ b/src/apps/stats.ts @@ -39,8 +39,7 @@ export = async (app: Application): Promise => { async function getInstallations (): Promise { const github = await app.auth() - const req = github.apps.listInstallations({ per_page: 100 }) - return github.paginate(req, (response: AnyResponse) => { + return github.paginate(github.apps.listInstallations.endpoint.merge({ per_page: 100 }), (response: AnyResponse) => { return response.data }) } @@ -57,8 +56,7 @@ export = async (app: Application): Promise => { const github = await app.auth(installation.id) - const req = github.apps.listRepos({ per_page: 100 }) - const repositories: Repository[] = await github.paginate(req, (response: AnyResponse) => { + const repositories: Repository[] = await github.paginate(github.apps.listRepos.endpoint.merge({ per_page: 100 }), (response: AnyResponse) => { return response.data.repositories.filter((repository: Repository) => !repository.private) })