diff --git a/cc-ci-plan/recipe-report.py b/cc-ci-plan/recipe-report.py index a2e4a0a..9d30a2d 100755 --- a/cc-ci-plan/recipe-report.py +++ b/cc-ci-plan/recipe-report.py @@ -139,12 +139,13 @@ def _links(links): f'{_esc(l["text"])}' for l in links) + "" -def _stories(items): +def _stories(items, repo_url=None): if not items: return "

Nothing this week.

" + lk = (lambda x: _linkify_recipes(_esc(x), repo_url)) if repo_url else _esc return "\n".join( - f'
{_esc(it.get("title"))}
' - f'
{_esc(it.get("body"))}
{_links(it.get("links"))}
' for it in items) + f'
{lk(it.get("title"))}
' + f'
{lk(it.get("body"))}
{_links(it.get("links"))}
' for it in items) def _table(rows): @@ -196,9 +197,9 @@ def render(spec_path, out_path): f'
{lead}
') if s.get("security"): body += ('
Security Bulletin
' - '

๐Ÿ”’ Critical CVE upgrades โ€” merge first

' + _stories(s["security"]) + "
") - body += f'

โš‘ Needs attention

{_stories(s.get("needs_attention"))}' - body += f'

Routine

{_stories(s.get("routine"))}
' + '

๐Ÿ”’ Critical CVE upgrades โ€” merge first

' + _stories(s["security"], repo_url) + "") + body += f'

โš‘ Needs attention

{_stories(s.get("needs_attention"), repo_url)}' + body += f'

Routine

{_stories(s.get("routine"), repo_url)}
' body += f'

The full wire โ€” every recipe

{_table(s.get("table"))}' body += (f'')