• 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/good_first_bug_unassign_inactive.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 GoodFirstBugUnassignInactive(BzCleaner):
×
10
    def __init__(self):
×
11
        super(GoodFirstBugUnassignInactive, self).__init__()
×
12
        self.nmonths = utils.get_config(self.name(), "months_lookup")
×
13
        self.autofix_assignee = {}
×
14

15
    def description(self):
×
16
        return "Bugs with good-first-bug keyword and no activity for the last {} months".format(
×
17
            self.nmonths
18
        )
19

20
    def get_autofix_change(self):
×
21
        return self.autofix_assignee
×
22

23
    def handle_bug(self, bug, data):
×
24
        bugid = str(bug["id"])
×
25
        doc = self.get_documentation()
×
26

27
        self.autofix_assignee[bugid] = {
×
28
            "comment": {
29
                "body": "This good-first-bug hasn't had any activity for {} months, it is automatically unassigned.\n{}".format(
30
                    self.nmonths, doc
31
                )
32
            },
33
            "reset_assigned_to": True,
34
            "status": "NEW",
35
        }
36

37
        return bug
×
38

39
    def get_bz_params(self, date):
×
40
        fields = ["assigned_to"]
×
41
        params = {
×
42
            "include_fields": fields,
43
            "resolution": "---",
44
            "f1": "keywords",
45
            "o1": "casesubstring",
46
            "v1": "good-first-bug",
47
            "f2": "days_elapsed",
48
            "o2": "greaterthan",
49
            "v2": self.nmonths * 30,
50
        }
51
        utils.get_empty_assignees(params, True)
×
52

53
        return params
×
54

55

56
if __name__ == "__main__":
×
57
    GoodFirstBugUnassignInactive().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