Update theme-badges.yml

Update badge workflow with removal of percentage score by Obsidian
This commit is contained in:
Jalad 2026-06-15 22:17:47 -05:00 committed by GitHub
parent da4e3db8f9
commit 56534dabe7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,11 +33,9 @@ jobs:
# Scorecard fields (Health / Review / percentage)
health = re.search(r'Health</span><span[^>]*>([^<]+)</span>', html)
review = re.search(r'Review</span><span[^>]*>([^<]+)</span>', html)
pct = re.search(r'tabular-nums"[^>]*>(\d{1,3})(?:<!--[^>]*-->)?%', html)
health_v = health.group(1).strip() if health else "unknown"
review_v = review.group(1).strip() if review else "unknown"
pct_v = pct.group(1) if pct else "?"
# Downloads count (e.g. "370k downloads", "1.2k downloads", "5M downloads")
dl = re.search(r'([\d.]+[KkMm]?)\s*downloads?', html)
@ -55,7 +53,7 @@ jobs:
scorecard = {
"schemaVersion": 1,
"label": "Obsidian Scorecard",
"message": f"{pct_v}% • {health_v} • {review_v}",
"message": f"{health_v} • {review_v}",
"color": color,
"namedLogo": "obsidian",
}