From 2e77ea6825e35f167973240e302a3fc2435d1008 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/113, branch: laszlokindrat/stack/1 --- src/stack_pr/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stack_pr/cli.py b/src/stack_pr/cli.py index 9ec2e1f..e1f480d 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,10 @@ 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) + assert False + # Embed stack-info into commit messages log(h("Updating commit messages with stack metadata"), level=2) needs_rebase = False