Repository navigation
Fix empty CHANGELOG entries for releases whose notes GitHub generated - #81
Merged
Merged
Conversation
…t with GitHub's comment Root cause: update-changelog.ps1 dropped line 1 of the release notes by position, assuming it was the "## What's Changed" heading, then stopped at the first "##". GitHub-generated notes for this repository start with a "<!-- Release notes generated ... -->" comment and a blank line, so the heading survived and ended the entry before any bullet (empty 9.0.1 entry in #67). Also splits on \r?\n, so CRLF notes no longer leave a carriage return on each copied line. Adds Pester regression tests and a pinned Pester 6.2.0 step to the lint workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U6RM4Rd2HejEcaWDY3qovL
iancooper
requested review from
DevJonny,
holytshirt and
preardon
as code owners
November 1, 2026 11:46
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U6RM4Rd2HejEcaWDY3qovL
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Symptom
When 9.0.1 was published,
after-release.ymlraneng/update-changelog.ps1and opened #67 with an entry that held only## 9.0.1and no bullets. It was filled by hand afterwards.Confirmed root cause
The script found the start of the content by position:
Select-Object -Skip 1always dropped line 1, assuming it was the## What's Changedheading, and the loop then stopped at the first##. That holds for upstream Polly's published notes. Our generated notes start differently:<!-- Release notes generated using configuration in .github/release.yml at main -->, a blank line, then## What's Changed. So the comment was dropped, the heading survived, and the loop broke before reading any bullet.Evidence, from running the script on throwaway copies:
The full diagnosis is in
bugfixes/0002-update-changelog-empty-entry/bugfix.md.Change
eng/update-changelog.ps1:##headings until the first bullet has been copied. The next##after that still ends the entry.Skip 1, which also silently lost the first bullet when the notes started with one.\r?\ninstead of`n, so CRLF notes no longer leave a\ron every copied line.eng/update-changelog.Tests.ps1: new Pester regression tests..github/workflows/lint.yml: aTest PowerShell scriptsstep installs Pester at a pinnedPESTER_VERSION: '6.2.0', alongsidePSSCRIPTANALYZER_VERSION, and runs every*.Tests.ps1file..github/wordlist.txt: addsCRLF.New dependency: Pester 6.2.0, a test-only PowerShell module, approved for this fix.
Out of scope, possible follow-ups:
@loginregex would turn@github-actions[bot]into[@github-actions](…)[bot]. It can't fire today, because copying stops before## New Contributors.<!-- next-release -->marker would put the entry at the top of the file.Verification
markdownlintand the spellcheck pass on the newbugfix.md.actionlintandzizmoraren't installed locally, so this PR'slintrun is the first check of the workflow change.src/or public API change.🤖 Generated with Claude Code
https://claude.ai/code/session_01U6RM4Rd2HejEcaWDY3qovL