ci: caller for PostHog/.github changeset-hygiene workflow#509
Conversation
|
does it also cover the use case where maybe we have modinified packages but no changeset at all? i think this would be great as well also take a look at |
- Replaces marocchino/sticky-pull-request-comment with inline github-script, matching the convention in posthog-js's check-posthog-major-version.yml. - Adds 'no changeset at all' warning when source files in workspace packages are modified but the PR has no changeset entries. - Adds 'unknown package name' warning when a changeset declares a name not present in the workspace (likely typo). - Pins pull_request trigger types to [opened, synchronize, reopened].
@marandaneto I moved this to PostHog/.github#39. Considered joining with |
…kflow Removes the local 169-line script and 85-line workflow in favor of a tiny 22-line caller delegating to PostHog/.github's reusable changeset-hygiene workflow (PostHog/.github#39). Same behavior, single source of truth across SDKs. Pinned to feat/changeset-hygiene while PostHog/.github#39 is open; will update to @main once that merges.
|
Nice!!! |
Updated to use merged workflow in PostHog/.github#39
💡 Motivation and Context
Adds a tiny caller workflow for the shared
changeset-hygienereusable workflow at PostHog/.github. Catches the class of mistake that caused #491 → #507: a changeset frontmatter pointing at the wrong workspace package, plus a few related failure modes:This PR carries no logic of its own — the workflow + script live in PostHog/.github so all SDKs share them. This file just delegates.
What it does
pull_requestagainstmain.uses: PostHog/.github/.github/workflows/changeset-hygiene.yml@main.<!-- changeset-hygiene -->when there's a coverage issue. Auto-deletes when fixed. Never blocks merging.Caller is 18 lines
The whole change is one file:
.github/workflows/changeset-hygiene.yml. The actual workflow + script are atPostHog/.github/.github/workflows/changeset-hygiene.ymlandPostHog/.github/.github/scripts/check-changeset-coverage.mjs.Test plan
Verified end-to-end on the parallel test PR #510, which uses the same caller plus deliberate simulation files (source change in
posthog-android-gradle-plugin/paired with a changeset declaringposthog-android). The workflow correctly posted the expected mismatch comment.This PR's own CI run (no workspace package changes, no changeset) correctly stays silent — the workflow only comments when there's an issue.
📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file(CI-only change — no workspace package code is touched, so no changeset is needed.)