@@ -88,6 +88,7 @@ describe("githubInputs", () => {
8888 . and . to . equal ( undefined ) ;
8989 expect ( test ) . to . haveOwnProperty ( "envPassthrough" ) . and . to . deep . equal ( [ ] ) ;
9090 expect ( test ) . to . haveOwnProperty ( "hideCloudWatchLogs" ) . and . to . equal ( false ) ;
91+ expect ( test ) . to . haveOwnProperty ( "disableGithubEnvVars" ) . and . to . equal ( false ) ;
9192 } ) ;
9293
9394 it ( "a project name is required." , ( ) => {
@@ -413,6 +414,29 @@ describe("inputs2Parameters", () => {
413414 expect ( test ) . to . not . haveOwnProperty ( "sourceLocationOverride" ) ;
414415 expect ( test ) . to . not . haveOwnProperty ( "sourceVersion" ) ;
415416 } ) ;
417+
418+ it ( "can process disable-github-env-vars" , ( ) => {
419+ process . env [ `GITHUB_REPOSITORY` ] = repoInfo ;
420+ process . env [ `GITHUB_SHA` ] = sha ;
421+
422+ const test = inputs2Parameters ( {
423+ projectName,
424+ sourceVersion : sha ,
425+ owner : "owner" ,
426+ repo : "repo" ,
427+ disableGithubEnvVars : true ,
428+ } ) ;
429+
430+ const [ repoEnv ] = test . environmentVariablesOverride . filter (
431+ ( { name } ) => name === "GITHUB_REPOSITORY"
432+ ) ;
433+ expect ( repoEnv ) . to . equal ( undefined ) ;
434+
435+ const [ shaEnv ] = test . environmentVariablesOverride . filter (
436+ ( { name } ) => name === "GITHUB_SHA"
437+ ) ;
438+ expect ( shaEnv ) . to . equal ( undefined ) ;
439+ } ) ;
416440} ) ;
417441
418442describe ( "waitForBuildEndTime" , ( ) => {
0 commit comments