File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed
Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -5332,11 +5332,6 @@ async function verifyCommits(repoToken) {
53325332 isCommitBad = true;
53335333 }
53345334
5335- if (message[0] !== message[0].toUpperCase()) {
5336- error(`commit message \"${message}\" should have first letter in upper case`);
5337- isCommitBad = true;
5338- }
5339-
53405335 const badKeywords = filterCommit(message);
53415336 if (badKeywords.length) {
53425337 error(`commit message \"${message}\" contains ${badKeywords.join()}`);
@@ -5349,7 +5344,7 @@ async function verifyCommits(repoToken) {
53495344 }
53505345 }
53515346 if (badCommits) {
5352- throw Error(`${badCommits} have been encountered. Please fix the above errors`);
5347+ throw Error(`${badCommits} bad commit(s) encountered. Please fix the above errors`);
53535348 }
53545349}
53555350async function main() {
@@ -5358,7 +5353,7 @@ async function main() {
53585353 await verifyCommits(repoToken);
53595354 debug('Recieved repo token');
53605355 } catch (e) {
5361- setFailed(`Action failed with error ${e.message}`);
5356+ setFailed(`Action failed with error: ${e.message}`);
53625357 }
53635358}
53645359
Original file line number Diff line number Diff line change @@ -30,11 +30,6 @@ async function verifyCommits(repoToken) {
3030 isCommitBad = true ;
3131 }
3232
33- if ( message [ 0 ] !== message [ 0 ] . toUpperCase ( ) ) {
34- error ( `commit message \"${ message } \" should have first letter in upper case` ) ;
35- isCommitBad = true ;
36- }
37-
3833 const badKeywords = filterCommit ( message ) ;
3934 if ( badKeywords . length ) {
4035 error ( `commit message \"${ message } \" contains ${ badKeywords . join ( ) } ` ) ;
@@ -47,7 +42,7 @@ async function verifyCommits(repoToken) {
4742 }
4843 }
4944 if ( badCommits ) {
50- throw Error ( `${ badCommits } have been encountered. Please fix the above errors` ) ;
45+ throw Error ( `${ badCommits } bad commit(s) encountered. Please fix the above errors` ) ;
5146 }
5247}
5348async function main ( ) {
@@ -56,7 +51,7 @@ async function main() {
5651 await verifyCommits ( repoToken ) ;
5752 debug ( 'Recieved repo token' ) ;
5853 } catch ( e ) {
59- setFailed ( `Action failed with error ${ e . message } ` ) ;
54+ setFailed ( `Action failed with error: ${ e . message } ` ) ;
6055 }
6156}
6257
You can’t perform that action at this time.
0 commit comments