@@ -76,6 +76,13 @@ describe('Commit Linter action', () => {
7676 await runAction ( )
7777
7878 td . verify ( core . setFailed ( contains ( 'You have commit messages with errors' ) ) )
79+ td . verify (
80+ core . setFailed (
81+ contains (
82+ 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint' ,
83+ ) ,
84+ ) ,
85+ )
7986 } )
8087
8188 it ( 'should fail for single push with incorrect message' , async ( ) => {
@@ -577,4 +584,25 @@ describe('Commit Linter action', () => {
577584 td . verify ( console . log ( 'Lint free! 🎉' ) )
578585 } )
579586 } )
587+
588+ describe ( 'when a different helpUrl is provided in the config' , ( ) => {
589+ beforeEach ( async ( ) => {
590+ cwd = await git . bootstrap ( 'fixtures/custom-help-url' )
591+ await gitEmptyCommit ( cwd , 'wrong message' )
592+ const [ to ] = await getCommitHashes ( cwd )
593+ await createPushEventPayload ( cwd , { to } )
594+ updatePushEnvVars ( cwd , to )
595+ td . replace ( process , 'cwd' , ( ) => cwd )
596+ td . replace ( console , 'log' )
597+ } )
598+
599+ it ( 'should show custom URL from helpUrl' , async ( ) => {
600+ await runAction ( )
601+
602+ td . verify (
603+ core . setFailed ( contains ( 'You have commit messages with errors' ) ) ,
604+ )
605+ td . verify ( core . setFailed ( contains ( ' https://example.org' ) ) )
606+ } )
607+ } )
580608} )
0 commit comments