@@ -3999,7 +3999,7 @@ async function execCommand(command, args, options = {}, logError = true) {
39993999 return false ;
40004000 }
40014001}
4002- async function runAction ( opticToken , githubToken , standardsFail , eventName , headRef , baseRef , owner , repo , sha ) {
4002+ async function runAction ( opticToken , githubToken , additionalArgs , standardsFail , eventName , headRef , baseRef , owner , repo , sha ) {
40034003 const failOnCheckError = standardsFail === "true" ;
40044004 const valid = verifyInput ( opticToken , eventName , owner , repo ) ;
40054005 if ( ! valid ) {
@@ -4038,7 +4038,7 @@ async function runAction(opticToken, githubToken, standardsFail, eventName, head
40384038 core . error ( "Unable to determine base for comparison." ) ;
40394039 return 1 ;
40404040 }
4041- const comparisonRun = await diffAll ( opticToken , from ) ;
4041+ const comparisonRun = await diffAll ( opticToken , from , additionalArgs ) ;
40424042 if ( eventName === "pull_request" ) {
40434043 const commentResult = await prComment ( githubToken , owner || "" , repo || "" , pr || "" , sha || "" ) ;
40444044 if ( ! commentResult ) {
@@ -4096,9 +4096,16 @@ async function deepen() {
40964096 }
40974097 return true ;
40984098}
4099- async function diffAll ( token , from ) {
4099+ async function diffAll ( token , from , additionalArgs ) {
41004100 core . info ( "Running Optic diff-all" ) ;
4101- return execCommand ( "optic" , [ "diff-all" , "--compare-from" , from , "--check" , "--upload" ] , {
4101+ return execCommand ( "optic" , [
4102+ "diff-all" ,
4103+ "--compare-from" ,
4104+ from ,
4105+ "--check" ,
4106+ "--upload" ,
4107+ ...( additionalArgs ? [ additionalArgs ] : [ ] ) ,
4108+ ] , {
41024109 env : Object . assign ( Object . assign ( { } , process . env ) , { OPTIC_TOKEN : token } ) ,
41034110 } , false ) ;
41044111}
@@ -4160,13 +4167,14 @@ const action_1 = __nccwpck_require__(672);
41604167const opticToken = core . getInput ( "optic_token" ) ;
41614168const githubToken = core . getInput ( "github_token" ) ;
41624169const standardsFail = core . getInput ( "standards_fail" ) ;
4170+ const additionalArgs = core . getInput ( "additional_args" ) ;
41634171const eventName = process . env . GITHUB_EVENT_NAME ;
41644172const headRef = process . env . GITHUB_REF ;
41654173const baseRef = process . env . GITHUB_BASE_REF ;
41664174const owner = process . env . GITHUB_REPOSITORY_OWNER ;
41674175const repo = ( _a = process . env . GITHUB_REPOSITORY ) === null || _a === void 0 ? void 0 : _a . split ( "/" ) [ 1 ] ;
41684176const sha = process . env . GITHUB_SHA ;
4169- ( 0 , action_1 . runAction ) ( opticToken , githubToken , standardsFail , eventName , headRef , baseRef , owner , repo , sha )
4177+ ( 0 , action_1 . runAction ) ( opticToken , githubToken , additionalArgs , standardsFail , eventName , headRef , baseRef , owner , repo , sha )
41704178 . then ( ( exitCode ) => {
41714179 return process . exit ( exitCode ) ;
41724180} )
0 commit comments