Skip to content

Commit bc72097

Browse files
committed
GitHub/Bugs: Also display state==closed items
... formatting them using ~strikethrough~.
1 parent bd530cc commit bc72097

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Change log
22

33
## In progress
4+
- GitHub/Bugs: Also display `state==closed` items, formatting them
5+
using ~~strikethrough~~.
46

57
## v0.3.0, 2025-02-24
68
- Opsgenie: Added alert reporter. Thanks, @WalBah.

src/rapporto/github/attention.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def query(self):
3434
self.add("org", self.inquiry.organization)
3535
self.add("updated", self.timeinterval.githubformat())
3636
self.add("label", ",".join(map(goosefeet, self.labels)))
37-
self.add("state", "open")
37+
# self.add("state", "open")
3838

3939

4040
class GitHubAttentionReport:
@@ -89,11 +89,15 @@ def markdown(self):
8989
mdc = MarkdownContent(labels=self.label_section_map)
9090
seen = {}
9191
for item in tqdm(self.items, leave=False):
92+
is_closed = item.state == "closed"
9293
title = sanitize_title(
9394
f"{repository_name(item.repository_url, with_org=True)}: {item.title}"
9495
)
9596
link = f"[{title}]({item.html_url})"
96-
line = f"- {link}"
97+
if is_closed:
98+
line = f"- ~{link}~"
99+
else:
100+
line = f"- {link}"
97101
# line = f"- {link} {', '.join(labels)}"
98102
if label := self.has_relevant_label(item):
99103
if item.html_url in seen:

0 commit comments

Comments
 (0)