Skip to content

Commit 19de9fd

Browse files
karlatectomzawadzki
authored andcommitted
Skip changes newer than branch for outdated changes
Skip item in the loop if the change is "more recent" than the branch itself. Signed-off-by: Karol Latecki <[email protected]>
1 parent 528aafe commit 19de9fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/scripts/outdated_changes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ def process_changes(gerrit, changes):
7373
logging.info(f"Saved branch tip date for {branch}: {branch_tip_date}")
7474

7575
time_since_branch_tip = branch_tip_date - created
76+
if time_since_branch_tip <= timedelta(0):
77+
# Change is newer than branch tip; skip it.
78+
continue
7679
if time_since_branch_tip > twelve_weeks:
7780
# Change is older than twelve weeks; we don't want VERY old changes to flood Gerrit dashboard,
7881
# so skip them.

0 commit comments

Comments
 (0)