From 8327d1e3a341747e66ef08fe8ab4ca7dc7b202e9 Mon Sep 17 00:00:00 2001 From: Michael Zolotukhin Date: Thu, 17 Oct 2024 15:59:35 -0700 Subject: [PATCH] Fix a bug with replacing $USERNAME in the branch name. --- src/stack_pr/cli.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/stack_pr/cli.py b/src/stack_pr/cli.py index 755ef9a..b70a676 100755 --- a/src/stack_pr/cli.py +++ b/src/stack_pr/cli.py @@ -567,9 +567,7 @@ def get_branch_name_base(branch_name_template: str): username = get_gh_username() current_branch_name = get_current_branch_name() branch_name_base = branch_name_template.replace("$USERNAME", username) - branch_name_base = branch_name_template.replace( - "$BRANCH", current_branch_name - ) + branch_name_base = branch_name_base.replace("$BRANCH", current_branch_name) return branch_name_base