Skip to content

Commit

Permalink
pw_docgen: Fix links to published SEEDs
Browse files Browse the repository at this point in the history
seed_metadata.py checked the badge style instead of the status, so
published SEEDs still linked to their CLs instead of the final SEED in
the index.

Change-Id: Ia66e506ae0576c90ab59fac390221e9a0d850383
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/267032
Commit-Queue: Auto-Submit <[email protected]>
Lint: Lint 🤖 <[email protected]>
Reviewed-by: Keir Mierle <[email protected]>
Presubmit-Verified: CQ Bot Account <[email protected]>
Pigweed-Auto-Submit: Wyatt Hepler <[email protected]>
Docs-Not-Needed: Wyatt Hepler <[email protected]>
  • Loading branch information
255 authored and CQ Bot Account committed Feb 11, 2025
1 parent e5ae6ad commit cb8a650
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pw_docgen/py/pw_docgen/sphinx/seed_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ def generate_seed_index(app: Sphinx, docname: str, source: list[str]) -> None:
source[
0
] += ' :header: "Number","Title","Status","Authors","Facilitator"\n\n'
for number in metadata:
cl = metadata[number]['cl']
status = map_status_to_badge_style(metadata[number]['status'])
title = metadata[number]['title']
for number, seed in metadata.items():
cl = seed['cl']
title = seed['title']
title = f'`{title} <https://pwrev.dev/{cl}>`__'
if status == 'Accepted':
if seed['status'].lower() == 'accepted':
title = f':ref:`seed-{number}`'
authors = ', '.join(metadata[number]['authors'])
facilitator = metadata[number]['facilitator']
authors = ', '.join(seed['authors'])
facilitator = seed['facilitator']
status = map_status_to_badge_style(seed['status'])
source[
0
] += f' "{number}","{title}","{status}","{authors}","{facilitator}"\n'
Expand Down

0 comments on commit cb8a650

Please sign in to comment.