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()