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

mozilla / relman-auto-nag / #4848

07 Dec 2023 02:35PM UTC coverage: 21.938%. Remained the same
#4848

push

coveralls-python

suhaibmujahid
Use `product::component` to refer to components in all emails

716 of 3588 branches covered (0.0%)

0 of 7 new or added lines in 7 files covered. (0.0%)

1924 of 8770 relevant lines covered (21.94%)

0.22 hits per line

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

0.0
/bugbot/rules/workflow/p1_no_activity.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
from bugbot.escalation import Escalation, NoActivityDays
×
8
from bugbot.nag_me import Nag
×
9

10

11
class P1NoActivity(BzCleaner, Nag):
×
12
    def __init__(self):
×
13
        super(P1NoActivity, self).__init__()
×
14
        self.escalation = Escalation(
×
15
            self.people,
16
            data=utils.get_config(self.name(), "escalation"),
17
            skiplist=utils.get_config("workflow", "supervisor_skiplist", []),
18
        )
19

20
    def description(self):
×
21
        return "P1 bugs and no activity for {} days".format(self.ndays)
×
22

23
    def nag_template(self):
×
24
        return self.template()
×
25

26
    def get_extra_for_template(self):
×
27
        return {"ndays": self.ndays}
×
28

29
    def get_extra_for_nag_template(self):
×
30
        return self.get_extra_for_template()
×
31

32
    def ignore_meta(self):
×
33
        return True
×
34

35
    def has_last_comment_time(self):
×
36
        return True
×
37

38
    def has_assignee(self):
×
39
        return True
×
40

41
    def has_product_component(self):
×
42
        return True
×
43

44
    def columns(self):
×
NEW
45
        return ["product", "component", "id", "summary", "last_comment", "assignee"]
×
46

47
    def set_people_to_nag(self, bug, buginfo):
×
48
        priority = "high"
×
49
        if not self.filter_bug(priority):
×
50
            return None
×
51

52
        # check if the product::component is in the list
53
        if not utils.check_product_component(self.components, bug):
×
54
            return None
×
55

56
        owner = bug["triage_owner"]
×
57
        assignee = bug["assigned_to"]
×
58
        if not self.add(assignee, buginfo, priority=priority, triage_owner=owner):
×
59
            self.add_no_manager(buginfo["id"])
×
60

61
        return bug
×
62

63
    def get_bz_params(self, date):
×
64
        self.ndays = NoActivityDays(self.name()).get(
×
65
            (utils.get_next_release_date() - self.nag_date).days
66
        )
67
        fields = ["triage_owner", "assigned_to"]
×
68
        self.components = utils.get_config("workflow", "components")
×
69
        params = {
×
70
            "component": utils.get_components(self.components),
71
            "bug_type": "defect",
72
            "include_fields": fields,
73
            "resolution": "---",
74
            "f1": "priority",
75
            "o1": "equals",
76
            "v1": "P1",
77
            "f2": "days_elapsed",
78
            "o2": "greaterthaneq",
79
            "v2": self.ndays,
80
        }
81

82
        utils.get_empty_assignees(params)
×
83

84
        return params
×
85

86

87
if __name__ == "__main__":
×
88
    P1NoActivity().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