Skip to content

Commit 3571917

Browse files
committed
Supporting source branch or commit.
1 parent f30d577 commit 3571917

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/scripts/control-tower-prcheck/run_control_tower_prcheck.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)