Skip to content

Commit

Permalink
[uplift_beta] Include bugs with needinfos not requested to the bug as…
Browse files Browse the repository at this point in the history
…signee (#2524)
  • Loading branch information
benjaminmah authored Nov 5, 2024
1 parent af573db commit 21a61d7
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions bugbot/rules/uplift_beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ def handle_bug(self, bug, data):
else:
nickname = bug["assigned_to_detail"]["nick"]

if self.is_needinfo_on_assignee(bug.get("flags", []), assignee):
return None

data[bugid] = {
"id": bugid,
"mail": assignee,
"nickname": nickname,
"summary": self.get_summary(bug),
"regressions": bug["regressions"],
}

return bug

def filter_by_regr(self, bugs):
Expand Down Expand Up @@ -82,6 +86,14 @@ def bug_handler(bug, data):

return bugs_without_regr

def is_needinfo_on_assignee(self, flags, assignee):
return any(
flag["name"] == "needinfo"
and flag["status"] == "?"
and flag["requestee"] == assignee
for flag in flags
)

def get_bz_params(self, date):
self.date = lmdutils.get_date_ymd(date)
fields = [
Expand All @@ -91,6 +103,8 @@ def get_bz_params(self, date):
"attachments.is_obsolete",
"attachments.content_type",
"cf_last_resolved",
"assigned_to",
"flags",
]
params = {
"include_fields": fields,
Expand All @@ -105,9 +119,6 @@ def get_bz_params(self, date):
"f3": "flagtypes.name",
"o3": "notsubstring",
"v3": "approval-mozilla-beta",
"f4": "flagtypes.name",
"o4": "notsubstring",
"v4": "needinfo",
# Don't nag several times
"n5": 1,
"f5": "longdesc",
Expand Down

0 comments on commit 21a61d7

Please sign in to comment.