Skip to content

Commit e42adab

Browse files
committed
GitHub/Actions: Fix deduplication for multiple workflows per repository
1 parent 47bcb25 commit e42adab

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Changelog
22

33
## In progress
4-
- Shell/Notify: Add reference about caveats page to weekly report's preamble
4+
- Shell/Notify: Added reference about caveats page to weekly report's preamble
5+
- GitHub/Actions: Fixed deduplication for multiple different workflows per repository
56

67
## v0.6.0, 2025-03-11
78
- Shell/Notify: Split root message into root+preamble, including links

src/rapporto/source/github/actions.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def runs(self):
3737
seen = set()
3838
for run in self.runs_failed:
3939
# Filter duplicates.
40-
key = f"{run.repository.full_name}-{run.head_branch}"
40+
key = f"{run.repository.full_name}-{run.head_branch}-{run.name}"
4141
if key in seen:
4242
continue
4343

@@ -52,13 +52,13 @@ def is_pr_successful(self, run):
5252
"""
5353
Find out if a given run has others that succeeded afterward.
5454
"""
55-
for pr in self.runs_pr_success:
55+
for pr_run in self.runs_pr_success:
5656
if (
57-
run.repository.full_name == pr.repository.full_name
58-
and run.head_branch == pr.head_branch
57+
run.repository.full_name == pr_run.repository.full_name
58+
and run.head_branch == pr_run.head_branch
59+
and run.name == pr_run.name
5960
):
60-
if pr.conclusion == "success":
61-
return True
61+
return True
6262
return False
6363

6464
@property

0 commit comments

Comments
 (0)