Skip to content

Commit

Permalink
fix: don't add count to PR title 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 c16bddc commit 0034370
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gitstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,10 @@ def parse_pr_table(self) -> List[int]:
@staticmethod
def get_title(index: int, total: int, title: str, is_draft: bool) -> str:
wip = "WIP: " if is_draft else ""
return f"[{index}/{total}] {wip}{title}"
if total == 1:
return f"{wip}{title}"
else:
return f"[{index}/{total}] {wip}{title}"

def set_title(self, index: int, total: int, title: str) -> bool:
new_title = self.get_title(index, total, title, self.is_draft)
Expand Down

0 comments on commit 0034370

Please sign in to comment.