@@ -16,6 +16,8 @@ const { GITHUB_EVENT_NAME, GITHUB_SHA } = process.env
1616
1717const configPath = resolve ( process . env . GITHUB_WORKSPACE , getInput ( 'configFile' ) )
1818
19+ const failOnErrors = resolve ( process . env . GITHUB_WORKSPACE , getInput ( 'failOnErrors' , { required : false } ) )
20+
1921const getCommitDepth = ( ) => {
2022 const commitDepthString = getInput ( 'commitDepth' )
2123 if ( ! commitDepthString ?. trim ( ) ) return null
@@ -145,6 +147,12 @@ const showLintResults = async ([from, to]) => {
145147
146148 if ( hasOnlyWarnings ( lintedCommits ) ) {
147149 handleOnlyWarnings ( formattedResults )
150+ } else if ( formattedResults && ( failOnErrors == false ) ) {
151+ // https://github.com/actions/toolkit/tree/master/packages/core#exit-codes
152+ // this would be a good place to implement the setNeutral() when it's eventually implimented.
153+ // for now it can pass with a check mark.
154+ console . log ( 'Passing despite errors ✅' )
155+ console . log ( `You have commit messages with errors\n\n${ formattedResults } ` )
148156 } else if ( formattedResults ) {
149157 setFailedAction ( formattedResults )
150158 } else {
@@ -156,6 +164,7 @@ const exitWithMessage = (message) => (error) => {
156164 setFailedAction ( `${ message } \n${ error . message } \n${ error . stack } ` )
157165}
158166
167+
159168const commitLinterAction = ( ) =>
160169 getRangeForEvent ( )
161170 . catch (
0 commit comments