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

mozilla / relman-auto-nag / #5247

01 Oct 2024 12:36PM CUT coverage: 21.657% (+0.01%) from 21.646%
#5247

push

coveralls-python

jgraham
Make webcompat platform bugs without keyword use BQ data

This is considered the canonical source for the list of webcompat core bugs,
so using it as the backend for the bug-bot rules avoids needing to duplicate
the logic across multiple systems.

585 of 3506 branches covered (16.69%)

0 of 13 new or added lines in 1 file covered. (0.0%)

2 existing lines in 2 files now uncovered.

1940 of 8958 relevant lines covered (21.66%)

0.22 hits per line

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

0.0
/bugbot/round_robin_fallback.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
import argparse
×
6

7
from . import logger, mail, utils
×
8
from .round_robin import RoundRobin
×
9

10

11
def send_mail(nag, dryrun=False):
×
12
    for fb, calendars in nag.items():
×
13
        mail.send_from_template(
×
14
            "round_robin_fallback_email.html",
15
            fb,
16
            "Triage owners need to be updated",
17
            Cc=utils.get_receivers("common"),
18
            dryrun=dryrun,
19
            calendars=calendars,
20
            plural=utils.plural,
21
        )
22

23

24
def check_people(date, dryrun=False):
×
25
    rr = RoundRobin.get_instance()
×
26
    # nag is a dict: persons -> list of persons
27
    #                team -> team name
28
    nag = rr.get_who_to_nag(date)
×
29
    send_mail(nag, dryrun=dryrun)
×
30

31

32
if __name__ == "__main__":
×
33
    parser = argparse.ArgumentParser(description="Check if next release date is ok")
×
34
    parser.add_argument(
×
35
        "--production",
36
        dest="dryrun",
37
        action="store_false",
38
        help="If the flag is not passed, just do the query, and print emails to console without emailing anyone",
39
    )
40
    parser.add_argument(
×
41
        "-D",
42
        "--date",
43
        dest="date",
44
        action="store",
45
        default="today",
46
        help="Date for the query",
47
    )
48
    args = parser.parse_args()
×
49
    try:
×
50
        check_people(args.date, dryrun=args.dryrun)
×
51
    except Exception:
×
52
        logger.exception("Rule round_robin_fallback")
×
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