Fix weekly update PR missing changelog details#1409
Merged
Conversation
The weekly update script fetched changelog.yaml which doesn't exist in policyengine-us (the repo uses CHANGELOG.md in Keep a Changelog format). This caused fetch_changelog() to silently return None, so PR bodies only showed the version table with no changelog details. - Switch fetch_changelog() to fetch CHANGELOG.md and return raw text - Add parse_changelog_md() to parse markdown into structured entries - Simplify get_changes_between_versions() since markdown entries have explicit version numbers (no bump increment logic needed) - Remove yaml import and pyyaml workflow dependency Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
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.
Summary
changelog.yamlfrompolicyengine-us, but that file doesn't exist — the repo usesCHANGELOG.mdin standard Keep a Changelog markdown formatfetch_changelog()silently returnedNone, so changelog sections were always emptyChanges
check_updates.py: Switchfetch_changelog()to fetchCHANGELOG.mdand return raw text; addparse_changelog_md()to parse markdown into the same dict structure downstream functions expect; simplifyget_changes_between_versions()to use explicit version numbers instead of bump increment logic; removeyamlimporttest_check_updates.py: Update test data to use explicit version fields; addTestParseChangelogMdclass with 6 test cases (single/multiple versions, multiple categories, H1 heading, empty input)weekly-update.yaml: Removepyyamlfrom pip install since it's no longer neededTest plan
cd .github/scripts && python -m pytest test_check_updates.py -v🤖 Generated with Claude Code