5
0
Fork 0
mirror of https://github.com/wagoid/commitlint-github-action.git synced 2025-11-07 08:06:54 +00:00

feat: list up to 100 commits at once resolves #717

This commit is contained in:
Wagner Santos 2023-07-20 05:54:29 -03:00
parent 456526eec7
commit 2be323bc44
2 changed files with 3 additions and 0 deletions

View file

@ -58,6 +58,7 @@ const getRangeForEvent = async () => {
owner, owner,
repo, repo,
pull_number: number, pull_number: number,
per_page: 100,
}) })
const commitShas = commits.map((commit) => commit.sha) const commitShas = commits.map((commit) => commit.sha)
const [from] = commitShas const [from] = commitShas

View file

@ -332,6 +332,7 @@ describe('Commit Linter action', () => {
owner: 'wagoid', owner: 'wagoid',
repo: 'commitlint-github-action', repo: 'commitlint-github-action',
pull_number: '1', pull_number: '1',
per_page: 100,
}), }),
).thenResolve({ ).thenResolve({
data: [first, to].map((sha) => ({ sha })), data: [first, to].map((sha) => ({ sha })),
@ -397,6 +398,7 @@ describe('Commit Linter action', () => {
owner: 'wagoid', owner: 'wagoid',
repo: 'commitlint-github-action', repo: 'commitlint-github-action',
pull_number: '1', pull_number: '1',
per_page: 100,
}), }),
).thenReject(new Error('HttpError: Bad credentials')) ).thenReject(new Error('HttpError: Bad credentials'))
td.replace(process, 'cwd', () => cwd) td.replace(process, 'cwd', () => cwd)