Unify the npm and PyPI package version checks - #15204
Draft
rtibbles wants to merge 2 commits into
Draft
Conversation
A pull_request payload's base.sha is the base branch tip, not the fork point. A PR sitting behind its base saw the base's own version bumps reported back at it, inverted — widget 2.0.0 -> 1.0.0 listed as a package that merging would publish. Diff from the merge base instead, and check out the PR head rather than the merge commit so the report cannot depend on how fresh GitHub's merge ref is. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PLm9i3T5J88TshHkekaiQM
The npm version check and comment workflows become a general package version check, driven by a table of ecosystems pairing a root directory, a manifest filename and a reader. The PR comment gains a Registry column so npm and PyPI packages share one table. Publishability is now read from the manifest for both ecosystems. pypi_publish.sh looped over every python_packages member regardless of the workflow's paths filter, so any push touching a listed package's pyproject.toml would have first-published the unlisted ones too. Python packages now opt out with the Private :: Do Not Upload classifier, which PyPI also enforces on upload, and the paths filter becomes a glob. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PLm9i3T5J88TshHkekaiQM
Contributor
Build Artifacts
Smoke test screenshot |
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
References
Follows up #13720.
Reviewer guidance
JS tests pass on CI.
AI usage
Used Claude Code to generalise the check across both ecosystems and write the regression test. Verified with the
.github/Jest suite and prek.