Skip to content

Print PR URL summary at end of submit and view (#50)#125

Open
SajidBashar wants to merge 1 commit into
modular:mainfrom
SajidBashar:feature/pr-url-summary
Open

Print PR URL summary at end of submit and view (#50)#125
SajidBashar wants to merge 1 commit into
modular:mainfrom
SajidBashar:feature/pr-url-summary

Conversation

@SajidBashar

Copy link
Copy Markdown

Closes #50.

After submit/view, the stack table shows PR numbers (clickable only with --hyperlinks), but there's no plain, copy-pasteable list of PR URLs. This adds a print_pr_summary() that prints one at the end of both commands.

  • Entries without a PR are skipped; nothing prints when the stack has no PRs (e.g. view before the stack has been exported).
  • Ordering matches print_stack (top of stack first).
  • Design note: printed unconditionally rather than behind --show-tips, since PR URLs are core output rather than a usage hint. Happy to gate it behind --show-tips if you'd prefer — it's a one-line move.

Test plan

  • Added unit tests covering ordering, skipping no-PR entries, and printing nothing when the stack has no PRs.
  • pytest (17 passed), ruff check, and ruff format --check all pass locally.

Add print_pr_summary(), which prints a plain, copy-pasteable list of the
stack's PR URLs after `submit` and `view`. Entries without a PR are
skipped, and nothing is printed when the stack has no PRs (e.g. `view`
before the stack has been exported).

The summary is printed unconditionally rather than behind --show-tips,
since the PR URLs are core output rather than a usage hint.

Closes modular#50.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nit: Add PR url to LAND_STACK_TIP

1 participant