Skip to content

Commit

Permalink
(chore): add no milestone correctly + dry run push (#1660)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan-gold committed Sep 4, 2024
1 parent fb92dbe commit e53b782
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions ci/scripts/towncrier_automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,19 @@ def main(argv: Sequence[str] | None = None) -> None:
subprocess.run(["git", "commit", "-m", pr_title], check=True)

# push
subprocess.run(
[
"git",
"push",
"--set-upstream",
"origin",
branch_name,
],
check=True,
)
if not args.dry_run:
subprocess.run(
[
"git",
"push",
"--set-upstream",
"origin",
branch_name,
],
check=True,
)
else:
print("Dry run, not pushing")

# Create a PR
subprocess.run(
Expand All @@ -100,7 +103,7 @@ def main(argv: Sequence[str] | None = None) -> None:
pr_description,
"--label",
"skip-gpu-ci",
*(["no milestone"] if branch_name == "main" else []),
*(["--label", "no milestone"] if branch_name == "main" else []),
*(["--dry-run"] if args.dry_run else []),
],
check=True,
Expand Down

0 comments on commit e53b782

Please sign in to comment.