From 2be323bc447ae46dae3c61171525e091f31d42c3 Mon Sep 17 00:00:00 2001 From: Wagner Santos <7467450+wagoid@users.noreply.github.com> Date: Thu, 20 Jul 2023 05:54:29 -0300 Subject: [PATCH] feat: list up to 100 commits at once resolves #717 --- src/action.js | 1 + src/action.test.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/action.js b/src/action.js index 5c72a4e..66be513 100644 --- a/src/action.js +++ b/src/action.js @@ -58,6 +58,7 @@ const getRangeForEvent = async () => { owner, repo, pull_number: number, + per_page: 100, }) const commitShas = commits.map((commit) => commit.sha) const [from] = commitShas diff --git a/src/action.test.js b/src/action.test.js index 89f5dc3..cd5850e 100644 --- a/src/action.test.js +++ b/src/action.test.js @@ -332,6 +332,7 @@ describe('Commit Linter action', () => { owner: 'wagoid', repo: 'commitlint-github-action', pull_number: '1', + per_page: 100, }), ).thenResolve({ data: [first, to].map((sha) => ({ sha })), @@ -397,6 +398,7 @@ describe('Commit Linter action', () => { owner: 'wagoid', repo: 'commitlint-github-action', pull_number: '1', + per_page: 100, }), ).thenReject(new Error('HttpError: Bad credentials')) td.replace(process, 'cwd', () => cwd)