File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -84,3 +84,4 @@ venv.bak/
8484pixi.lock
8585
8686.stack-pr.cfg
87+ .vscode
Original file line number Diff line number Diff line change @@ -258,5 +258,5 @@ keep_body=False
258258remote=origin
259259target=main
260260reviewer=GithubHandle1,GithubHandle2
261- branch_name_template=$USERNAME/stack
261+ branch_name_template=$USERNAME/$BRANCH
262262```
Original file line number Diff line number Diff line change 5454import re
5555from functools import cache
5656from subprocess import SubprocessError
57+ from typing import List , NamedTuple , Optional , Pattern
5758
5859from stack_pr .git import (
5960 branch_exists ,
6768 run_shell_command ,
6869 set_show_commands ,
6970)
70- from typing import List , NamedTuple , Optional , Pattern
7171
7272# A bunch of regexps for parsing commit messages and PR descriptions
7373RE_RAW_COMMIT_ID = re .compile (r"^(?P<commit>[a-f0-9]+)$" , re .MULTILINE )
@@ -565,7 +565,9 @@ def add_or_update_metadata(
565565@cache
566566def get_branch_name_base (branch_name_template : str ):
567567 username = get_gh_username ()
568+ current_branch_name = get_current_branch_name ()
568569 branch_name_base = branch_name_template .replace ("$USERNAME" , username )
570+ branch_name_base = branch_name_template .replace ("$BRANCH" ,current_branch_name )
569571 return branch_name_base
570572
571573
@@ -1388,6 +1390,7 @@ def main():
13881390 check_gh_installed ()
13891391
13901392 current_branch = get_current_branch_name ()
1393+ get_branch_name_base (common_args .branch_name_template )
13911394 try :
13921395 if args .command != "view" and not is_repo_clean ():
13931396 error (ERROR_REPO_DIRTY )
You can’t perform that action at this time.
0 commit comments