From 3efbfd18685f8e47d0f210efaa88110bbd743b55 Mon Sep 17 00:00:00 2001 From: Benjamin Mah Date: Wed, 7 Aug 2024 14:26:11 -0400 Subject: [PATCH] Added `max_actions` to the `inactive_revision` rule --- bugbot/rules/inactive_revision.py | 4 ++++ configs/rules.json | 3 +++ 2 files changed, 7 insertions(+) diff --git a/bugbot/rules/inactive_revision.py b/bugbot/rules/inactive_revision.py index 9f68a6538..b01a8e7c0 100644 --- a/bugbot/rules/inactive_revision.py +++ b/bugbot/rules/inactive_revision.py @@ -48,10 +48,14 @@ def __init__(self, old_patch_months: int = 6, patch_activity_months: int = 6): self.patch_activity_limit = ( lmdutils.get_date_ymd("today") - relativedelta(months=patch_activity_months) ).timestamp() + self.max_actions = utils.get_config(self.name(), "max_actions", 1) def description(self): return "Bugs with inactive patches that are awaiting action from authors or reviewers." + def get_max_actions(self): + return self.max_actions + def columns(self): return ["id", "summary", "revisions", "needinfo_user"] diff --git a/configs/rules.json b/configs/rules.json index 3fca4a8c1..158c37110 100644 --- a/configs/rules.json +++ b/configs/rules.json @@ -463,5 +463,8 @@ "leave_open_sec": { "additional_receivers": "rm", "days_lookup": 2 + }, + "inactive_revision": { + "max_actions": 1 } }