From a6c55040f277c683ef2d2a6b4ee4f9b965e86beb Mon Sep 17 00:00:00 2001 From: Michael Zolotukhin Date: Tue, 8 Oct 2024 13:10:21 -0700 Subject: [PATCH] Update delete_remote_branches to also use branch name template. --- src/stack_pr/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stack_pr/cli.py b/src/stack_pr/cli.py index 4eb82f8..d6d7488 100755 --- a/src/stack_pr/cli.py +++ b/src/stack_pr/cli.py @@ -1039,12 +1039,12 @@ def delete_remote_branches(st: List[StackEntry], remote: str, verbose: bool): log(h("Deleting remote branches"), level=1) run_shell_command(["git", "fetch", "--prune", remote], quiet=not verbose) - username = get_gh_username() + branch_name_base = get_branch_name_base(branch_name_template) refs = get_command_output( [ "git", "for-each-ref", - f"refs/remotes/{remote}/{username}/stack", + f"refs/remotes/{remote}/{branch_name_base}", "--format=%(refname)", ] ).split()