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

chore(deps): upgrade @commitlint dependencies

Resolves #187
This commit is contained in:
wagoid 2021-07-07 13:30:04 -03:00
parent 8ea34043f2
commit 9e5880e3f8
3 changed files with 10666 additions and 14805 deletions

25399
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -23,13 +23,13 @@
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/github": "^4.0.0",
"@commitlint/config-angular": "^12.0.0",
"@commitlint/config-conventional": "^12.0.0",
"@commitlint/config-lerna-scopes": "^12.0.0",
"@commitlint/config-patternplate": "^12.0.0",
"@commitlint/format": "^12.0.0",
"@commitlint/lint": "^12.0.0",
"@commitlint/load": "^12.0.0",
"@commitlint/config-angular": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@commitlint/config-lerna-scopes": "^12.1.4",
"@commitlint/config-patternplate": "^12.1.4",
"@commitlint/format": "^12.1.4",
"@commitlint/lint": "^12.1.4",
"@commitlint/load": "^12.1.4",
"commitlint-config-jira": "^1.4.1",
"commitlint-plugin-jira-rules": "^1.4.0",
"conventional-changelog-lint-config-canonical": "^1.0.0",

View file

@ -147,7 +147,7 @@ describe('Commit Linter action', () => {
cwd = await git.bootstrap('fixtures/conventional')
await gitEmptyCommit(cwd, 'message from before push')
await gitEmptyCommit(cwd, 'wrong message 1')
await gitEmptyCommit(cwd, 'chore(WRONG): message 2')
await gitEmptyCommit(cwd, 'wrong message 2')
const [, , to] = await getCommitHashes(cwd)
await createPushEventPayload(cwd, { before: gitEmptySha, to })
updatePushEnvVars(cwd, to)
@ -156,7 +156,7 @@ describe('Commit Linter action', () => {
await runAction()
td.verify(core.setFailed(contains('wrong message 1')), { times: 0 })
td.verify(core.setFailed(contains('chore(WRONG): message 2')))
td.verify(core.setFailed(contains('wrong message 2')))
})
it('should fail for commit with scope that is not a lerna package', async () => {
@ -551,4 +551,26 @@ describe('Commit Linter action', () => {
})
})
})
describe('when commit contains signed-off-by message', () => {
beforeEach(async () => {
cwd = await git.bootstrap('fixtures/conventional')
await gitEmptyCommit(
cwd,
'chore: correct message\n\nsome context without leading blank line\nSigned-off-by: John Doe <john.doe@example.com>',
)
const [to] = await getCommitHashes(cwd)
await createPushEventPayload(cwd, { to })
updatePushEnvVars(cwd, to)
td.replace(process, 'cwd', () => cwd)
td.replace(console, 'log')
})
it('should pass', async () => {
await runAction()
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
td.verify(console.log('Lint free! 🎉'))
})
})
})