Skip to content

fix(cards): parse HTML release-feed tables before generating Bluefin cards - #1126

Open
castrojo wants to merge 1 commit into
projectbluefin:v4from
castrojo:fix/html-release-feed-tables-1099
Open

fix(cards): parse HTML release-feed tables before generating Bluefin cards#1126
castrojo wants to merge 1 commit into
projectbluefin:v4from
castrojo:fix/html-release-feed-tables-1099

Conversation

@castrojo

@castrojo castrojo commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Problem

scripts/lib/card-feed-parser.mjs only recognized Markdown release tables. When fetch-feeds.js falls back to the GitHub Atom feed (used when GITHUB_TOKEN/GH_TOKEN isn't available), the feed content is GitHub-rendered HTML rather than raw Markdown. parseFeedItem() returned null for every Bluefin/Bluefin LTS item, and node scripts/generate-card-images.mjs logged no release found, skipping both Bluefin card slugs and generating only the Dakota card.

Fix

  • Add stripHtml(), splitHtmlRow(), and extractSectionsHtml() to card-feed-parser.mjs, parsing the same ### Heading + table sections from the HTML table representation GitHub renders for release bodies.
  • parseFeedItem() now picks the HTML or Markdown extractor based on the feed content, reusing the existing parseTwoColTableMd/parseDiffRows/parseCommitRows helpers against the extracted rows (both extractors produce the same string[][] row shape).
  • Added a fixture test (generate-card-images.test.js) built from the real HTML GitHub renders for release notes (verified against https://github.com/projectbluefin/bluefin/releases/tag/stable-20260602), covering Major/DX packages, diff stats, and commit counts.

Testing

  • npm test — all 486 tests pass.
  • npx eslint scripts/lib/card-feed-parser.mjs scripts/generate-card-images.test.js — clean.

Closes #1099.

— hive: backend=copilot model=claude-sonnet-5

🐝 Hive Agent: contributor | SHA: 0a6421ae

…cards

card-feed-parser.mjs only recognized Markdown release tables. When
fetch-feeds.js falls back to the GitHub Atom feed (no GITHUB_TOKEN), the
feed content is GitHub-rendered HTML instead of raw Markdown, so
parseFeedItem() returned null for every Bluefin/Bluefin LTS item and
generate-card-images.mjs logged "no release found", skipping both
Bluefin card slugs.

Add extractSectionsHtml()/splitHtmlRow()/stripHtml() to parse the HTML
table representation of the same '### Heading' + table sections, and
have parseFeedItem() choose the HTML or Markdown extractor based on the
feed content. Cover it with a fixture built from the real HTML GitHub
renders for release bodies.

Signed-off-by: castrojo <castrojo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant