[Git][qa/jenkins.debian.net][master] reproduce.d.n/stats: make URLs in headings clickable

Holger Levsen (@holger) gitlab at salsa.debian.org
Thu Dec 19 00:58:17 GMT 2024



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
360f38e5 by Holger Levsen at 2024-12-19T01:58:03+01:00
reproduce.d.n/stats: make URLs in headings clickable

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/rebuilderd_stats.py


Changes:

=====================================
bin/rebuilderd_stats.py
=====================================
@@ -2,7 +2,7 @@
 
 from collections import defaultdict
 from datetime import datetime
-from re import search, DOTALL
+from re import search, sub, DOTALL
 from sqlite3 import connect
 from sys import argv
 
@@ -127,6 +127,8 @@ def main() -> None:
 
     for message, packages in messages_packages.items():
         anchor = message.replace(" ", "-")
+        message = sub(r'(#)([0-9]*)', r'https://bugs.debian.org/\2', message)
+        message = sub(r'(https://[a-z.A-Z_0-9/]*)', r'<a href="\1">\1</a>', message)
         print(f'\n<h2 id="{anchor}">{message}</h2>')
         packages = sorted(packages, key=lambda pkg: package_logs.get(pkg, 0))
         print("\n".join(format_link(pkg) for pkg in packages))



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/360f38e59e565e2c01ff2543e6f904fd2ed25c91

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/360f38e59e565e2c01ff2543e6f904fd2ed25c91
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20241219/1dcabdcf/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list