Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ghstack/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2164,14 +2164,14 @@ def format_url(s: DiffMeta) -> str:

if self.short:
# Guarantee that the FIRST PR URL is the top of the stack
print("\n".join(format_url(s) for s in reversed(diffs_to_submit)))
print("\n".join(format_url(s) for s in diffs_to_submit))
return

print()
print("# Summary of changes (ghstack {})".format(ghstack.__version__))
print()
if diffs_to_submit:
for s in reversed(diffs_to_submit):
for s in diffs_to_submit:
url = format_url(s)
print(" - {} {}".format(s.what, url))

Expand Down
15 changes: 15 additions & 0 deletions test/submit/short_stack.py.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from ghstack.test_prelude import *

await init_test()

await commit("A")
await commit("B")
with captured_output() as (out, err):
await gh_submit("Initial", short=True)
assert_eq(
out.getvalue(),
"https://github.com/pytorch/pytorch/pull/501\n"
"https://github.com/pytorch/pytorch/pull/500\n",
)

ok()
Loading