You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a regression / incomplete fix of #1659 (fixed by #1661). HTML tags inside inline code spans in commit subjects are intentionally left unescaped by htmlEscape, but they still break the PR-body re-parsing step, causing a component's release to be silently skipped.
src/changelog-notes/default.tshtmlEscape() escapes bare </>, but via the regex /[^`].*[^`]|`[^`]*`|<|>/g with match.length > 1 ? match : ... it leaves </>inside inline code spans untouched. So a subject like add `check --report <path>` keeps a raw <path> in the generated release-PR body.
On release creation, src/util/pull-request-body.tsextractMultipleReleases() re-parses the PR body with node-html-parser. It does not understand markdown backticks, so <path> is treated as an unclosed HTML tag and the following <details> block(s) get nested inside it and dropped from root.getElementsByTagName('details') — the exact mechanism described in HTML tags in commit messages can break PR message parsing, causing missing package releases #1659.
src/strategies/base.ts then logs Pull request contains releases, but not for component: <X> and skips that component: no git tag, no GitHub release, no publish — while the workflow still reports success.
The next release-please run can no longer find that component's release boundary (tag missing) and re-walks its entire history, producing a bogus major bump in the next release PR.
Steps to reproduce
In a manifest repo with ≥2 packages, land a commit whose subject contains an inline code span with an HTML-tag-looking token, e.g. feat: add `--report <path>` flag (affecting multiple packages so it appears in multiple <details> blocks).
Merge the release PR.
Observe that the component carrying the 2nd occurrence is not released (no tag/release/publish), though the run succeeds.
Real-world case: an 11-package release PR dropped exactly the package whose <details> block contained the 2nd <path> occurrence.
Suggested fix
Since the PR body is later HTML-parsed (not rendered as markdown), </> should be escaped even when inside code spans when generating the body. Alternatively, make extractMultipleReleases extract <details> blocks robustly so an unclosed tag in note text cannot corrupt the DOM and drop sibling blocks.
This is a regression / incomplete fix of #1659 (fixed by #1661). HTML tags inside inline code spans in commit subjects are intentionally left unescaped by
htmlEscape, but they still break the PR-body re-parsing step, causing a component's release to be silently skipped.Environment
release-please17.6.0 (googleapis/release-please-action@v5)include-component-in-tag: trueRoot cause
src/changelog-notes/default.tshtmlEscape()escapes bare</>, but via the regex/[^`].*[^`]|`[^`]*`|<|>/gwithmatch.length > 1 ? match : ...it leaves</>inside inline code spans untouched. So a subject likeadd `check --report <path>`keeps a raw<path>in the generated release-PR body.src/util/pull-request-body.tsextractMultipleReleases()re-parses the PR body withnode-html-parser. It does not understand markdown backticks, so<path>is treated as an unclosed HTML tag and the following<details>block(s) get nested inside it and dropped fromroot.getElementsByTagName('details')— the exact mechanism described in HTML tags in commit messages can break PR message parsing, causing missing package releases #1659.src/strategies/base.tsthen logsPull request contains releases, but not for component: <X>and skips that component: no git tag, no GitHub release, no publish — while the workflow still reports success.Steps to reproduce
feat: add `--report <path>` flag(affecting multiple packages so it appears in multiple<details>blocks).Minimal reproduction
Real-world case: an 11-package release PR dropped exactly the package whose
<details>block contained the 2nd<path>occurrence.Suggested fix
Since the PR body is later HTML-parsed (not rendered as markdown),
</>should be escaped even when inside code spans when generating the body. Alternatively, makeextractMultipleReleasesextract<details>blocks robustly so an unclosed tag in note text cannot corrupt the DOM and drop sibling blocks.