mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2025-11-07 08:06:54 +00:00
parent
0e361e0644
commit
961b6d4cd7
3 changed files with 11 additions and 4 deletions
6
fixtures/signed-off-by/commitlint.config.js
Normal file
6
fixtures/signed-off-by/commitlint.config.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
rules: {
|
||||
'signed-off-by': [2, 'always', 'Signed-off-by:'],
|
||||
},
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
/* eslint-env jest */
|
||||
import { git } from '@commitlint/test'
|
||||
import { describe } from '@jest/globals'
|
||||
import execa from 'execa'
|
||||
import td from 'testdouble'
|
||||
import {
|
||||
|
|
@ -555,12 +556,12 @@ describe('Commit Linter action', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('when commit contains signed-off-by message', () => {
|
||||
describe('when commit contains required signed-off-by message', () => {
|
||||
beforeEach(async () => {
|
||||
cwd = await git.bootstrap('fixtures/conventional')
|
||||
cwd = await git.bootstrap('fixtures/signed-off-by')
|
||||
await gitEmptyCommit(
|
||||
cwd,
|
||||
'chore: correct message\n\nsome context without leading blank line\nSigned-off-by: John Doe <john.doe@example.com>',
|
||||
'chore: correct message\n\nsome context without leading blank line.\n\nSigned-off-by: John Doe <john.doe@example.com>',
|
||||
)
|
||||
const [to] = await getCommitHashes(cwd)
|
||||
await createPushEventPayload(cwd, { to })
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ const gitCommits = async (gitOpts) => {
|
|||
|
||||
return {
|
||||
hash,
|
||||
message,
|
||||
message: message.replace(commitDelimiter, ''),
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue