fix(cards): parse HTML release-feed tables before generating Bluefin cards - #1126
Open
castrojo wants to merge 1 commit into
Open
fix(cards): parse HTML release-feed tables before generating Bluefin cards#1126castrojo wants to merge 1 commit into
castrojo wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
scripts/lib/card-feed-parser.mjsonly recognized Markdown release tables. Whenfetch-feeds.jsfalls back to the GitHub Atom feed (used whenGITHUB_TOKEN/GH_TOKENisn't available), the feedcontentis GitHub-rendered HTML rather than raw Markdown.parseFeedItem()returnednullfor every Bluefin/Bluefin LTS item, andnode scripts/generate-card-images.mjsloggedno release found, skipping both Bluefin card slugs and generating only the Dakota card.Fix
stripHtml(),splitHtmlRow(), andextractSectionsHtml()tocard-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 existingparseTwoColTableMd/parseDiffRows/parseCommitRowshelpers against the extracted rows (both extractors produce the samestring[][]row shape).generate-card-images.test.js) built from the real HTML GitHub renders for release notes (verified againsthttps://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