зеркало из https://github.com/mozilla/bugbot.git
regression_without_regressed_by: consider unaccessible bugs as invalid (#612)
This commit is contained in:
Родитель
e14a7606c0
Коммит
5241de50b0
|
@ -54,6 +54,7 @@ class RegressionWithoutRegressedBy(BzCleaner):
|
|||
|
||||
def history_handler(bug, data):
|
||||
bugid = bug['id']
|
||||
treated.add(bugid)
|
||||
resolved_before = False
|
||||
for h in bug['history']:
|
||||
if resolved_before:
|
||||
|
@ -68,6 +69,7 @@ class RegressionWithoutRegressedBy(BzCleaner):
|
|||
data.add(bugid)
|
||||
|
||||
invalids = set()
|
||||
treated = set()
|
||||
Bugzilla(
|
||||
bugids=list(all_deps),
|
||||
include_fields=['id', 'keywords', 'cf_last_resolved'],
|
||||
|
@ -77,6 +79,10 @@ class RegressionWithoutRegressedBy(BzCleaner):
|
|||
historydata=invalids,
|
||||
).get_data().wait()
|
||||
|
||||
# Some bugs aren't accessible so they won't appear in treated (all_deps - treated)
|
||||
# Since we don't have any info about them, then we consider them as invalid
|
||||
invalids |= all_deps - treated
|
||||
|
||||
for bugid, info in bugs.items():
|
||||
info['deps'] -= invalids
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<p>The following {{ plural('bug is', data, pword='bugs are') }} a regression and some dependencies:
|
||||
<p>The following {{ plural('bug is', data, pword='bugs are') }} a regression and {{ plural('has', data, pword='have') }} some dependencies but regressed_by is empty:
|
||||
<table {{ table_attrs }}>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
Загрузка…
Ссылка в новой задаче