mirror of
https://github.com/jalad25/contact-note.git
synced 2026-07-22 06:53:06 +00:00
Update scorecard-badge.yml
Update badge workflow with removal of percentage score by Obsidian
This commit is contained in:
parent
9e2595c373
commit
24c7037f4a
1 changed files with 1 additions and 3 deletions
4
.github/workflows/scorecard-badge.yml
vendored
4
.github/workflows/scorecard-badge.yml
vendored
|
|
@ -32,11 +32,9 @@ jobs:
|
|||
|
||||
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 "?"
|
||||
|
||||
color = {
|
||||
"Excellent": "brightgreen",
|
||||
|
|
@ -49,7 +47,7 @@ jobs:
|
|||
badge = {
|
||||
"schemaVersion": 1,
|
||||
"label": "Obsidian Scorecard",
|
||||
"message": f"{pct_v}% • {health_v} • {review_v}",
|
||||
"message": f"{health_v} • {review_v}",
|
||||
"color": color,
|
||||
"namedLogo": "obsidian",
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue