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

mozilla / relman-auto-nag / #5349

20 Nov 2024 03:30PM CUT coverage: 21.298% (-0.1%) from 21.399%
#5349

push

coveralls-python

web-flow
Add whiteboard flag to webcompat sightline bugs (#2498)


Co-authored-by: Suhaib Mujahid <suhaibmujahid@gmail.com>

426 of 2942 branches covered (14.48%)

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

1 existing line in 1 file now uncovered.

1943 of 9123 relevant lines covered (21.3%)

0.21 hits per line

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

0.0
/bugbot/rules/webcompat_platform_without_keyword.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

NEW
5
from bugbot import gcp
×
6
from bugbot.bzcleaner import BzCleaner
×
7

8

9
class WebcompatPlatformWithoutKeyword(BzCleaner):
×
10
    normal_changes_max = 200
×
11

12
    def description(self):
×
13
        return "Web Compat platform bugs without webcompat:platform-bug keyword"
×
14

15
    def filter_no_nag_keyword(self):
×
16
        return False
×
17

18
    def has_default_products(self):
×
19
        return False
×
20

21
    def get_autofix_change(self):
×
22
        return {
×
23
            "keywords": {"add": ["webcompat:platform-bug"]},
24
        }
25

26
    def get_bz_params(self, date):
×
27
        fields = ["id", "summary", "keywords"]
×
28
        return {"include_fields": fields, "id": self.get_core_bug_ids()}
×
29

30
    def get_core_bug_ids(self):
×
31
        project = "moz-fx-dev-dschubert-wckb"
×
32
        dataset = "webcompat_knowledge_base"
×
33

NEW
34
        client = gcp.get_bigquery_client(project, ["cloud-platform", "drive"])
×
UNCOV
35
        query = f"""
×
36
        SELECT core_bug
37
        FROM `{project}.{dataset}.prioritized_kb_entries` as kb_entries
38
            JOIN `moz-fx-dev-dschubert-wckb.webcompat_knowledge_base.bugzilla_bugs` as bugzilla_bugs ON bugzilla_bugs.number = kb_entries.core_bug
39
        WHERE "webcompat:platform-bug" not in UNNEST(bugzilla_bugs.keywords)
40
        LIMIT {self.normal_changes_max}
41
        """
42

43
        return list(row["core_bug"] for row in client.query(query).result())
×
44

45

46
if __name__ == "__main__":
×
47
    WebcompatPlatformWithoutKeyword().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