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

mozilla / relman-auto-nag / #4349

pending completion
#4349

push

coveralls-python

sosa-e
Revert "Minimizing config file"

This reverts commit 614159597.

564 of 3081 branches covered (18.31%)

24 of 24 new or added lines in 24 files covered. (100.0%)

1804 of 7980 relevant lines covered (22.61%)

0.23 hits per line

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

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

9

10
class MetaNoDepsNoActivity(BzCleaner):
×
11
    def __init__(self):
×
12
        super(MetaNoDepsNoActivity, self).__init__()
×
13
        self.people = People.get_instance()
×
14
        self.nmonths = utils.get_config(self.name(), "months_lookup")
×
15
        self.max_ni = utils.get_config(self.name(), "max_ni")
×
16
        self.skiplist = set(utils.get_config(self.name(), "skiplist", []))
×
17

18
    def description(self):
×
19
        return "Bugs with meta keyword, not depending on bugs and no activity for the last {} months".format(
×
20
            self.nmonths
21
        )
22

23
    def get_extra_for_needinfo_template(self):
×
24
        return self.get_extra_for_template()
×
25

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

29
    def get_auto_ni_skiplist(self):
×
30
        return super().get_auto_ni_skiplist() | self.skiplist
×
31

32
    def get_max_ni(self):
×
33
        return self.max_ni
×
34

35
    def get_mail_to_auto_ni(self, bug):
×
36
        for field in ["assigned_to", "triage_owner"]:
×
37
            person = bug.get(field, "")
×
38
            if person and self.people.is_mozilla(person):
×
39
                return {"mail": person, "nickname": bug[f"{field}_detail"]["nick"]}
×
40

41
        return None
×
42

43
    def get_bz_params(self, date):
×
44
        fields = ["assigned_to", "triage_owner"]
×
45
        params = {
×
46
            "include_fields": fields,
47
            "resolution": "---",
48
            "f1": "keywords",
49
            "o1": "casesubstring",
50
            "v1": "meta",
51
            "f2": "days_elapsed",
52
            "o2": "greaterthan",
53
            "v2": self.nmonths * 30,
54
            "f3": "dependson",
55
            "o3": "isempty",
56
        }
57

58
        return params
×
59

60

61
if __name__ == "__main__":
×
62
    MetaNoDepsNoActivity().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