From 33740c2174aefa5418894d893dcea4347cbd2f5d Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 12 Nov 2024 20:13:04 +1300 Subject: [PATCH] Deduplicate the rows for each tracked issue in the pipeline --- zashi-pipeline.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zashi-pipeline.py b/zashi-pipeline.py index 3f2a429d..3fd30106 100644 --- a/zashi-pipeline.py +++ b/zashi-pipeline.py @@ -74,6 +74,12 @@ class ReleasePipeline: def __repr__(self): return '%s | %s | %s | %s | %s' % self.columns() + def __eq__(self, other): + return self.columns() == other.columns() + + def __hash__(self): + return hash(self.columns()) + def columns(self): return ( self.rust, @@ -250,6 +256,9 @@ def main(): for issue in tracked_issues.values(): rows = [ReleasePipeline(row) for row in build_release_matrix_from(dg, issue, RUST)] + # Deduplicate rows + rows = list(dict.fromkeys(rows)) + for i, row in enumerate(rows): f.write('')