• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / relman-auto-nag / #4536

pending completion
#4536

push

coveralls-python

web-flow
[severity_inconsistency] Drop the dependency on the whiteboard tags (#2078)

641 of 3222 branches covered (19.89%)

2 of 2 new or added lines in 1 file covered. (100.0%)

1821 of 7999 relevant lines covered (22.77%)

0.23 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/bugbot/rules/severity_inconsistency.py
1
# This Source Code Form is subject to the terms of the Mozilla Public
2
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
3
# You can obtain one at http://mozilla.org/MPL/2.0/.
4

5
from bugbot import utils
×
6
from bugbot.bzcleaner import BzCleaner
×
7

8

9
class SeverityInconsistency(BzCleaner):
×
10
    def description(self):
×
11
        return "Bugs with inconsistent severity flags"
×
12

13
    def has_needinfo(self):
×
14
        return True
×
15

16
    def handle_bug(self, bug, data):
×
17
        bugid = str(bug["id"])
×
18
        data[bugid] = {
×
19
            "accessibility_severity": bug["cf_accessibility_severity"],
20
            "severity": bug["severity"],
21
        }
22
        self.extra_ni = data
×
23

24
        return bug
×
25

26
    def get_extra_for_needinfo_template(self):
×
27
        return self.extra_ni
×
28

29
    def columns(self):
×
30
        return ["id", "summary", "severity", "accessibility_severity"]
×
31

32
    def get_mail_to_auto_ni(self, bug):
×
33
        for field in ["assigned_to", "triage_owner"]:
×
34
            person = bug.get(field, "")
×
35
            if person and not utils.is_no_assignee(person):
×
36
                return {"mail": person, "nickname": bug[f"{field}_detail"]["nick"]}
×
37

38
        return None
×
39

40
    def get_bz_params(self, date):
×
41
        fields = [
×
42
            "triage_owner",
43
            "assigned_to",
44
            "severity",
45
            "cf_accessibility_severity",
46
        ]
47

48
        params = {
×
49
            "include_fields": fields,
50
            "resolution": "---",
51
            "j1": "OR",
52
            "f1": "OP",
53
            "f2": "OP",
54
            "f3": "cf_accessibility_severity",
55
            "o3": "equals",
56
            "v3": "s3",
57
            "f4": "bug_severity",
58
            "o4": "equals",
59
            "v4": "S4",
60
            "f5": "CP",
61
            "f6": "OP",
62
            "f7": "cf_accessibility_severity",
63
            "o7": "equals",
64
            "v7": "s1",
65
            "f8": "bug_severity",
66
            "o8": "anyexact",
67
            "v8": "S2,S3,S4",
68
            "f9": "CP",
69
            "f10": "OP",
70
            "f11": "cf_accessibility_severity",
71
            "o11": "equals",
72
            "v11": "s2",
73
            "f12": "bug_severity",
74
            "o12": "anyexact",
75
            "v12": "S3,S4",
76
            "f13": "CP",
77
            "f14": "CP",
78
            "n15": 1,
79
            "f15": "longdesc",
80
            "o15": "casesubstring",
81
            "v15": "could you consider increasing the severity?",
82
        }
83

84
        return params
×
85

86

87
if __name__ == "__main__":
×
88
    SeverityInconsistency().run()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc