Skip to content

GitHub/Actions: Fix deduplication for multiple workflows per repository #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changelog

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

## v0.6.0, 2025-03-11
- Shell/Notify: Split root message into root+preamble, including links
Expand Down
12 changes: 6 additions & 6 deletions src/rapporto/source/github/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
seen = set()
for run in self.runs_failed:
# Filter duplicates.
key = f"{run.repository.full_name}-{run.head_branch}"
key = f"{run.repository.full_name}-{run.head_branch}-{run.name}"

Check warning on line 40 in src/rapporto/source/github/actions.py

View check run for this annotation

Codecov / codecov/patch

src/rapporto/source/github/actions.py#L40

Added line #L40 was not covered by tests
if key in seen:
continue

Expand All @@ -52,13 +52,13 @@
"""
Find out if a given run has others that succeeded afterward.
"""
for pr in self.runs_pr_success:
for pr_run in self.runs_pr_success:

Check warning on line 55 in src/rapporto/source/github/actions.py

View check run for this annotation

Codecov / codecov/patch

src/rapporto/source/github/actions.py#L55

Added line #L55 was not covered by tests
if (
run.repository.full_name == pr.repository.full_name
and run.head_branch == pr.head_branch
run.repository.full_name == pr_run.repository.full_name
and run.head_branch == pr_run.head_branch
and run.name == pr_run.name
):
if pr.conclusion == "success":
return True
return True

Check warning on line 61 in src/rapporto/source/github/actions.py

View check run for this annotation

Codecov / codecov/patch

src/rapporto/source/github/actions.py#L61

Added line #L61 was not covered by tests
return False

@property
Expand Down