зеркало из https://github.com/mozilla/bugbot.git
surface bugs with a lot of cc & votes (#1280)
* surface bugs with a lot of cc & votes * remove artifact * fix black
This commit is contained in:
Родитель
8d7fe9caab
Коммит
4ac56ae2f8
|
@ -239,6 +239,26 @@
|
|||
"release-mgmt@mozilla.com"
|
||||
]
|
||||
},
|
||||
"lot_of_votes":
|
||||
{
|
||||
"weeks_lookup": 3,
|
||||
"number_votes": 50,
|
||||
"receivers":
|
||||
[
|
||||
"sledru@mozilla.com",
|
||||
"release-mgmt@mozilla.com"
|
||||
]
|
||||
},
|
||||
"lot_of_cc":
|
||||
{
|
||||
"weeks_lookup": 3,
|
||||
"number_cc": 50,
|
||||
"receivers":
|
||||
[
|
||||
"sledru@mozilla.com",
|
||||
"release-mgmt@mozilla.com"
|
||||
]
|
||||
},
|
||||
"closed_dupeme":
|
||||
{
|
||||
"days_lookup": 100
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from auto_nag import utils
|
||||
from auto_nag.bzcleaner import BzCleaner
|
||||
|
||||
|
||||
class SeveralCc(BzCleaner):
|
||||
def __init__(self):
|
||||
super(SeveralCc, self).__init__()
|
||||
self.nweeks = utils.get_config(self.name(), "weeks_lookup")
|
||||
self.cc = utils.get_config(self.name(), "number_cc")
|
||||
|
||||
def description(self):
|
||||
return "Bugs with several cc for the last {} weeks".format(self.nweeks)
|
||||
|
||||
def columns(self):
|
||||
return ["id", "summary", "creation", "last_change"]
|
||||
|
||||
def handle_bug(self, bug, data):
|
||||
bugid = str(bug["id"])
|
||||
data[bugid] = {
|
||||
"creation": utils.get_human_lag(bug["creation_time"]),
|
||||
"last_change": utils.get_human_lag(bug["last_change_time"]),
|
||||
}
|
||||
return bug
|
||||
|
||||
def get_bz_params(self, date):
|
||||
params = {
|
||||
"include_fields": ["creation_time", "last_change_time"],
|
||||
"resolution": "---",
|
||||
"f1": "days_elapsed",
|
||||
"o1": "lessthan",
|
||||
"v1": self.nweeks * 7,
|
||||
"f2": "cc_count",
|
||||
"o2": "greaterthaneq",
|
||||
"v2": self.cc,
|
||||
"f3": "keywords",
|
||||
"o3": "nowords",
|
||||
"v3": ["meta", "intermittent"],
|
||||
}
|
||||
return params
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
SeveralCc().run()
|
|
@ -0,0 +1,47 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from auto_nag import utils
|
||||
from auto_nag.bzcleaner import BzCleaner
|
||||
|
||||
|
||||
class SeveralVotes(BzCleaner):
|
||||
def __init__(self):
|
||||
super(SeveralVotes, self).__init__()
|
||||
self.nweeks = utils.get_config(self.name(), "weeks_lookup")
|
||||
self.votes = utils.get_config(self.name(), "number_votes")
|
||||
|
||||
def description(self):
|
||||
return "Bugs with several votes for the last {} weeks".format(self.nweeks)
|
||||
|
||||
def columns(self):
|
||||
return ["id", "summary", "creation", "last_change"]
|
||||
|
||||
def handle_bug(self, bug, data):
|
||||
bugid = str(bug["id"])
|
||||
data[bugid] = {
|
||||
"creation": utils.get_human_lag(bug["creation_time"]),
|
||||
"last_change": utils.get_human_lag(bug["last_change_time"]),
|
||||
}
|
||||
return bug
|
||||
|
||||
def get_bz_params(self, date):
|
||||
params = {
|
||||
"include_fields": ["creation_time", "last_change_time"],
|
||||
"resolution": "---",
|
||||
"f1": "days_elapsed",
|
||||
"o1": "lessthan",
|
||||
"v1": self.nweeks * 7,
|
||||
"votes_type": "greaterthaneq",
|
||||
"votes": "10",
|
||||
"f2": "votes",
|
||||
"f3": "keywords",
|
||||
"o3": "nowords",
|
||||
"v3": ["meta", "intermittent"],
|
||||
}
|
||||
return params
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
SeveralVotes().run()
|
|
@ -13,9 +13,7 @@ class SeveralDups(BzCleaner):
|
|||
self.ndups = utils.get_config(self.name(), "number_dups")
|
||||
|
||||
def description(self):
|
||||
return 'Bugs with several dups for the last {} weeks'.format(
|
||||
self.nweeks
|
||||
)
|
||||
return "Bugs with several dups for the last {} weeks".format(self.nweeks)
|
||||
|
||||
def columns(self):
|
||||
return ["id", "summary", "creation", "last_change"]
|
||||
|
|
|
@ -84,6 +84,12 @@ python -m auto_nag.scripts.meta_defect
|
|||
# Bugs with several duplicates
|
||||
python -m auto_nag.scripts.several_dups
|
||||
|
||||
# Bugs with a lot of cc
|
||||
python -m auto_nag.scripts.lot_of_cc
|
||||
|
||||
# Bugs with a lot of votes
|
||||
python -m auto_nag.scripts.lot_of_votes
|
||||
|
||||
# reporter has a needinfo and no activity for the last X weeks
|
||||
# Pretty common
|
||||
python -m auto_nag.scripts.newbie_with_ni -d
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<p>The following {{ plural('bug has', data, pword='bugs have') }} many cc
|
||||
<table {{ table_attrs }}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bug</th><th>Summary</th><th>Creation</th><th>Last comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i, (bugid, summary, creation, last_change) in enumerate(data) -%}
|
||||
<tr {% if i % 2 == 0 %}bgcolor="#E0E0E0"{% endif -%}>
|
||||
<td>
|
||||
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id={{ bugid }}">{{ bugid }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ summary | e }}
|
||||
</td>
|
||||
<td>
|
||||
{{ creation }}
|
||||
</td>
|
||||
<td>
|
||||
{{ last_change }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor -%}
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
|
@ -0,0 +1,27 @@
|
|||
<p>The following {{ plural('bug has', data, pword='bugs have') }} many votes
|
||||
<table {{ table_attrs }}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bug</th><th>Summary</th><th>Creation</th><th>Last comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i, (bugid, summary, creation, last_change) in enumerate(data) -%}
|
||||
<tr {% if i % 2 == 0 %}bgcolor="#E0E0E0"{% endif -%}>
|
||||
<td>
|
||||
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id={{ bugid }}">{{ bugid }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ summary | e }}
|
||||
</td>
|
||||
<td>
|
||||
{{ creation }}
|
||||
</td>
|
||||
<td>
|
||||
{{ last_change }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor -%}
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
Загрузка…
Ссылка в новой задаче