Skip to content

Commit c603499

Browse files
Fixing new line when not displaying checks
1 parent 2030489 commit c603499

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/stacky/stacky.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ def cmd_inbox(stack: StackBranchSet, args):
17761776
def get_check_status(pr):
17771777
"""Get a summary of merge check status"""
17781778
if not pr.get("statusCheckRollup") or len(pr.get("statusCheckRollup")) == 0:
1779-
return "No checks", "gray"
1779+
return "", "gray"
17801780

17811781
rollup = pr["statusCheckRollup"]
17821782

@@ -1787,7 +1787,7 @@ def get_check_status(pr):
17871787
states.append(check["state"])
17881788

17891789
if not states:
1790-
return "No checks", "gray"
1790+
return "", "gray"
17911791

17921792
# Determine overall status based on individual check states
17931793
if "FAILURE" in states or "ERROR" in states:
@@ -1811,7 +1811,9 @@ def display_pr_list(prs, color="white"):
18111811
cout("{} ", clickable_number)
18121812
cout("{} ", pr["title"], fg="white")
18131813
cout("({}) ", pr["headRefName"], fg="gray")
1814-
cout("{} ", check_text, fg=check_color)
1814+
cout("by {} ", pr["author"]["login"], fg="gray")
1815+
if check_text:
1816+
cout("{} ", check_text, fg=check_color)
18151817
cout("Updated: {}\n", pr["updatedAt"][:10], fg="gray")
18161818
else:
18171819
# Full format with clickable PR number
@@ -1820,7 +1822,9 @@ def display_pr_list(prs, color="white"):
18201822
cout("{} ", clickable_number)
18211823
cout("{}\n", pr["title"], fg=color)
18221824
cout(" {} -> {}\n", pr["headRefName"], pr["baseRefName"], fg="gray")
1823-
cout(" {}\n", check_text, fg=check_color)
1825+
cout(" Author: {}\n", pr["author"]["login"], fg="gray")
1826+
if check_text:
1827+
cout(" {}\n", check_text, fg=check_color)
18241828
cout(" {}\n", pr["url"], fg="blue")
18251829
cout(" Updated: {}, Created: {}\n\n", pr["updatedAt"][:10], pr["createdAt"][:10], fg="gray")
18261830

@@ -1867,7 +1871,8 @@ def display_pr_list(prs, color="white"):
18671871
cout("{} ", pr["title"], fg="white")
18681872
cout("({}) ", pr["headRefName"], fg="gray")
18691873
cout("by {} ", pr["author"]["login"], fg="gray")
1870-
cout("{} ", check_text, fg=check_color)
1874+
if check_text:
1875+
cout("{} ", check_text, fg=check_color)
18711876
cout("Updated: {}\n", pr["updatedAt"][:10], fg="gray")
18721877
else:
18731878
# Full format with clickable PR number
@@ -1877,7 +1882,8 @@ def display_pr_list(prs, color="white"):
18771882
cout("{}\n", pr["title"], fg="white")
18781883
cout(" {} -> {}\n", pr["headRefName"], pr["baseRefName"], fg="gray")
18791884
cout(" Author: {}\n", pr["author"]["login"], fg="gray")
1880-
cout(" {}\n", check_text, fg=check_color)
1885+
if check_text:
1886+
cout(" {}\n", check_text, fg=check_color)
18811887
cout(" {}\n", pr["url"], fg="blue")
18821888
cout(" Updated: {}, Created: {}\n\n", pr["updatedAt"][:10], pr["createdAt"][:10], fg="gray")
18831889
else:

0 commit comments

Comments
 (0)