Skip to content

Commit

Permalink
feat: list up to 100 commits at once resolves #717
Browse files Browse the repository at this point in the history
  • Loading branch information
wagoid committed Jul 22, 2023
1 parent 456526e commit 2be323b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/action.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })),
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2be323b

Please sign in to comment.