@@ -76,6 +76,13 @@ describe('Commit Linter action', () => {
76
76
await runAction ( )
77
77
78
78
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
+ )
79
86
} )
80
87
81
88
it ( 'should fail for single push with incorrect message' , async ( ) => {
@@ -577,4 +584,25 @@ describe('Commit Linter action', () => {
577
584
td . verify ( console . log ( 'Lint free! 🎉' ) )
578
585
} )
579
586
} )
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
+ } )
580
608
} )
0 commit comments