File tree Expand file tree Collapse file tree
.github/workflows/scripts/control-tower-prcheck Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def _parse_args() -> argparse.Namespace:
7171 type = _parse_components ,
7272 help = "Comma-separated list of affected component names" ,
7373 )
74- parser .add_argument ("--source-commit" , required = True , help = "Source commit SHA" )
74+ parser .add_argument ("--source-commit" , default = None , help = "Source commit SHA" )
7575 parser .add_argument (
7676 "--source-branch" ,
7777 default = None ,
@@ -410,8 +410,9 @@ def main() -> None:
410410 "components" : args .components ,
411411 "buildReason" : args .build_reason ,
412412 "repoUri" : args .repo_uri ,
413- "sourceCommitSha" : args .source_commit ,
414413 }
414+ if args .source_commit is not None :
415+ payload ["sourceCommitSha" ] = args .source_commit
415416 if args .source_branch is not None :
416417 payload ["sourceBranch" ] = args .source_branch
417418 if args .target_commit is not None :
You can’t perform that action at this time.
0 commit comments