[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser-build][main] Bug 41807: fix generation of clickable Bugzilla query URL



Title: GitLab

morgan pushed to branch main at The Tor Project / Applications / tor-browser-build

Commits:

  • 7b4eb0f2
    by Morgan at 2026-06-04T18:34:02+00:00
    Bug 41807: fix generation of clickable Bugzilla query URL
    

1 changed file:

Changes:

  • tools/browser/generate-bugzilla-triage-csv.py
    ... ... @@ -20,9 +20,9 @@ GITLAB_LABELS = [
    20 20
     GITLAB_MILESTONE = "Browser 16.0"
    
    21 21
     
    
    22 22
     
    
    23
    -def download_bugs(url):
    
    24
    -    url += "&" if "?" in url else "?"
    
    25
    -    url += "include_fields=id,product,component,summary"
    
    23
    +def download_bugs(query):
    
    24
    +    url = f"https://bugzilla.mozilla.org/rest/bug?{query}&include_fields=id,product,component,summary"
    
    25
    +
    
    26 26
         r = requests.get(url)
    
    27 27
         r.raise_for_status()
    
    28 28
         # {"bugs": [ {...}, ... ]}
    
    ... ... @@ -76,9 +76,9 @@ def extract_from_git(repo_path, ff_version, bugs):
    76 76
         # So, we expect this number to be quite low and that it will be
    
    77 77
         # possible to fetch all these bugs in a single pass.
    
    78 78
         if seen_ids:
    
    79
    -        url = "https://bugzilla.mozilla.org/rest/bug?id="
    
    80
    -        url += ",".join([str(i) for i in seen_ids])
    
    81
    -        results.update(download_bugs(url))
    
    79
    +        query = "id="
    
    80
    +        query += ",".join([str(i) for i in seen_ids])
    
    81
    +        results.update(download_bugs(query))
    
    82 82
         bugs.update(results)
    
    83 83
     
    
    84 84
     
    
    ... ... @@ -147,7 +147,7 @@ def generate_csv(bugs, audit_issue, query, output_path):
    147 147
                 writer.writerow(["FALSE", create_link, component, bugzilla_link])
    
    148 148
     
    
    149 149
             writer.writerow([])
    
    150
    -        writer.writerow([make_hyperlink(query, "Bugzilla query")])
    
    150
    +        writer.writerow([make_hyperlink(f"https://bugzilla.mozilla.org/buglist.cgi?{query}", "Bugzilla query")])
    
    151 151
     
    
    152 152
     
    
    153 153
     def main():
    
    ... ... @@ -191,7 +191,7 @@ def main():
    191 191
             sys.exit(1)
    
    192 192
     
    
    193 193
         excluded_products = "Thunderbird,Calendar,Chat%20Core,MailNews%20Core"
    
    194
    -    query = f"https://bugzilla.mozilla.org/rest/bug?f1=product&n1=1&o1=anyexact&v1={excluded_products}&f2=target_milestone&o2=substring&v2={args.ff_version}&limit=0"
    
    194
    +    query = f"f1=product&n1=1&o1=anyexact&v1={excluded_products}&f2=target_milestone&o2=substring&v2={args.ff_version}&limit=0"
    
    195 195
         bugs = download_bugs(query)
    
    196 196
         extract_from_git(args.repo_path, args.ff_version, bugs)
    
    197 197
     
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx