зеркало из https://github.com/mozilla/bugbug.git
Sort patches by raw riskiness value, even if we then only show risk bands to users
This commit is contained in:
Родитель
1021e572ab
Коммит
3a979cf9c0
|
@ -613,6 +613,11 @@ class LandingsRiskReportGenerator(object):
|
|||
if time_to_assign is not None:
|
||||
break
|
||||
|
||||
max_risk = (
|
||||
max(commit["risk"] for commit in commit_data)
|
||||
if len(commit_data)
|
||||
else None
|
||||
)
|
||||
bug_summary = {
|
||||
"id": bug_id,
|
||||
"regressor": bug_id in regressor_bug_ids,
|
||||
|
@ -651,11 +656,8 @@ class LandingsRiskReportGenerator(object):
|
|||
else None,
|
||||
"commits": commit_data,
|
||||
"meta_ids": list(blocker_to_meta[bug_id]),
|
||||
"risk_band": find_risk_band(
|
||||
max(commit["risk"] for commit in commit_data)
|
||||
)
|
||||
if len(commit_data) > 0
|
||||
else None,
|
||||
"risk": max_risk,
|
||||
"risk_band": find_risk_band(max_risk) if max_risk is not None else None,
|
||||
"fuzz": "b"
|
||||
if bug["id"] in fuzzblocker_bugs
|
||||
else "y"
|
||||
|
|
|
@ -2464,16 +2464,7 @@ function getCompareFunction(field) {
|
|||
};
|
||||
} else if (field == "Riskiness") {
|
||||
return function (a, b) {
|
||||
if (a.risk_band == b.risk_band) {
|
||||
return 0;
|
||||
} else if (
|
||||
a.risk_band == "h" ||
|
||||
(a.risk_band == "a" && b.risk_band == "l")
|
||||
) {
|
||||
return 1;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
return a.risk - b.risk;
|
||||
};
|
||||
} else if (field == "Bug") {
|
||||
return function (a, b) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче