From 09f6a91e98d0c9ef377cd6f49802c66818dd60ec Mon Sep 17 00:00:00 2001 From: Laszlo Kindrat Date: Tue, 6 Jan 2026 15:49:40 -0500 Subject: [PATCH] Fix PR link display on first submit Moves the stack display to after PR creation so that PR links are shown correctly on first submission instead of showing "no PR". stack-info: PR: https://github.com/modular/stack-pr/pull/114, branch: laszlokindrat/stack/2 --- src/stack_pr/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stack_pr/cli.py b/src/stack_pr/cli.py index 9ec2e1f..cf52324 100755 --- a/src/stack_pr/cli.py +++ b/src/stack_pr/cli.py @@ -1091,7 +1091,6 @@ def command_submit( branch_name_template=args.branch_name_template, ) set_base_branches(st, args.target) - print_stack(st, links=args.hyperlinks) # If the current branch contains commits from the stack, we will need to # rebase it in the end since the commits will be modified. @@ -1114,6 +1113,9 @@ def command_submit( # Verify consistency in everything we have so far verify(st) + # Print stack now that PRs have been created + print_stack(st, links=args.hyperlinks) + # Embed stack-info into commit messages log(h("Updating commit messages with stack metadata"), level=2) needs_rebase = False