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

mozilla / relman-auto-nag / #4160

pending completion
#4160

push

coveralls-python

web-flow
Fix a typo

Co-authored-by: Marco Castelluccio <mcastelluccio@mozilla.com>

553 of 3089 branches covered (17.9%)

1797 of 7986 relevant lines covered (22.5%)

0.23 hits per line

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

0.0
/auto_nag/scripts/topcrash_bad_severity.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 auto_nag import utils
×
6
from auto_nag.bzcleaner import BzCleaner
×
7

8

9
class TopcrashBadSeverity(BzCleaner):
×
10
    def __init__(self):
×
11
        super(TopcrashBadSeverity, self).__init__()
×
12
        self.extra_ni = {}
×
13

14
    def description(self):
×
15
        return "Bugs with topcrash keyword but incorrect severity"
×
16

17
    def ignore_date(self):
×
18
        return True
×
19

20
    def ignore_meta(self):
×
21
        return True
×
22

23
    def get_mail_to_auto_ni(self, bug):
×
24
        for field in ["assigned_to", "triage_owner"]:
×
25
            person = bug.get(field, "")
×
26
            if not utils.is_no_assignee(person):
×
27
                return {"mail": person, "nickname": bug[f"{field}_detail"]["nick"]}
×
28

29
        return None
×
30

31
    def handle_bug(self, bug, data):
×
32
        bugid = str(bug["id"])
×
33
        self.extra_ni[bugid] = {
×
34
            "severity": bug["severity"],
35
        }
36
        return bug
×
37

38
    def get_extra_for_needinfo_template(self):
×
39
        return self.extra_ni
×
40

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

48
        return {
×
49
            "include_fields": fields,
50
            "resolution": ["---"],
51
            "bug_severity": [
52
                "S3",
53
                "normal",
54
                "S4",
55
                "minor",
56
                "trivial",
57
                "enhancement",
58
            ],
59
            "keywords": ["topcrash", "topcrash-startup"],
60
            "n1": 1,
61
            "f1": "longdesc",
62
            "o1": "casesubstring",
63
            "v1": "could you consider increasing the severity of this top-crash bug?",
64
        }
65

66

67
if __name__ == "__main__":
×
68
    TopcrashBadSeverity().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