Skip to content

Commit

Permalink
fix: don't generate PR table if there is only one entry
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Jan 12, 2024
1 parent a984892 commit c16bddc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gitstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,8 @@ def set_table(self, stack_prs: List["PullRequest"]) -> bool:
row["PR"] = f">{pr.number}"
rows.append(row)
table = make_markdown_table(rows, ["", "PR", "Title"])
if len(stack_prs) == 1:
table = ""
if table != self.table:
new_body = table + "\n" + self.body
gh("pr", "edit", str(self.number), "-b", new_body, capture_output=False)
Expand Down

0 comments on commit c16bddc

Please sign in to comment.