From 3c88c1254d21f642f6dc7877c46770585a1cbfc5 Mon Sep 17 00:00:00 2001 From: mart-r Date: Mon, 16 Feb 2026 17:09:30 +0000 Subject: [PATCH] CU-869c5kge0: Fix the script for automated bumps of tutorials / scripts. The previous script would attempt to return to 'main' branch at the end of each PR. But instead, we need to return to the reference we started with. This PR should fix this issue. --- .github/scripts/bump_dependants.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/scripts/bump_dependants.py b/.github/scripts/bump_dependants.py index a6a30d5d9..2d5e237d6 100644 --- a/.github/scripts/bump_dependants.py +++ b/.github/scripts/bump_dependants.py @@ -112,6 +112,13 @@ def main(): run(["git", "config", "user.name", "github-actions[bot]"]) run(["git", "config", "user.email", "github-actions[bot]@users.noreply.github.com"]) + start_ref = subprocess.run( + ["git", "rev-parse", "HEAD"], + capture_output=True, text=True, check=True, + ).stdout.strip() + print(f"Starting ref: {start_ref}") + + for dependant in args.dependants: dependant = dependant.strip().removesuffix(os.path.sep).strip() print(f"\nProcessing: {dependant}") @@ -145,7 +152,7 @@ def main(): ), ) - run(["git", "checkout", "main"]) + run(["git", "checkout", start_ref]) print("\nDone.")