ci: warn when changesets don't cover modified packages [SIMULATION]#508
Closed
turnipdabeets wants to merge 8 commits intomainfrom
Closed
ci: warn when changesets don't cover modified packages [SIMULATION]#508turnipdabeets wants to merge 8 commits intomainfrom
turnipdabeets wants to merge 8 commits intomainfrom
Conversation
6 tasks
Contributor
|
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.
💡 Motivation and Context
Draft / simulation — do not merge as-is.
Adds a non-blocking CI workflow that compares packages modified in a PR against packages declared in any changeset added/modified in that PR, and posts a sticky comment if they don't line up. Designed to catch the class of mistake that caused #491 → #507: changeset frontmatter pointing at the wrong package.
This PR also intentionally simulates that mistake so the workflow's comment can be observed end-to-end:
posthog-android-gradle-plugin/"posthog-android": patchWhen validation is done, the simulation files (
.changeset/coverage-check-simulation.mdandposthog-android-gradle-plugin/SIMULATION_DELETE_BEFORE_MERGE.md) get deleted, leaving just the workflow + script.What the workflow does
pull_requestagainstmain.pnpm-workspace.yamland each package'spackage.jsonto map directories → package names.CHANGELOG.md/package.jsonsource file changed..changeset/*.mdadded or modified in the PR.marocchino/sticky-pull-request-comment.💚 How did you test it?
scripts/check-changeset-coverage.mjslocally on this branch — it correctly identifiedposthog-android-gradle-pluginas modified-but-undeclared andposthog-androidas declared-but-unmodified.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file(The changeset present in this PR is part of the simulation, not a real release. No
releaselabel.)Follow-ups before this is mergeable
marocchino/sticky-pull-request-comment@v2to a SHA (the rest of the codebase pins third-party actions to SHA).