Skip to content

ci: enforce the pending-changesets convention and align the docs - #282

Merged
Imod7 merged 3 commits into
mainfrom
ci-changeset-location
Aug 10, 2026
Merged

ci: enforce the pending-changesets convention and align the docs#282
Imod7 merged 3 commits into
mainfrom
ci-changeset-location

Conversation

@Imod7

@Imod7 Imod7 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds a CI check that fails a pull request when it puts a changeset file into
product-sdk/.changeset/ instead of product-sdk/pending-changesets/, whether
directly or inside a subdirectory.

The check allows the one case where a file legitimately arrives in .changeset/:
a release PR promoting a changeset that was already parked in pending-changesets/.

Changes

.github/workflows/changeset-location.yml (new file)

A single job that checks out the repository and compares the pull request against
its base commit, using a three-dot diff so that adding a changeset and moving it in
a later commit ends up green. It collects two kinds of offender:

  • Unpromoted changesets. Any .md added directly under product-sdk/.changeset/,
    except README.md. --no-renames makes a legitimate promotion appear as an add
    under .changeset/ plus a delete of the same basename under pending-changesets/,
    and those cancel each other out. Whatever add is left over was authored straight
    into .changeset/. Deletes are matched at any depth, so promoting a changeset
    parked in a pending-changesets/ subdirectory still counts as a promotion.
  • Anything inside a .changeset/ subdirectory, of any extension, never cancelled
    by a promotion delete. There is no legitimate promotion into a subdirectory.

Failures produce one inline annotation per file in the Files changed tab, plus a
copy-paste block of remediation commands, deduplicated so several files sharing one
offending directory print a single git rm -r. Cause and fix differ by depth, so the
messages do too: git mv for a direct file, git rm -r for a directory.

The workflow deliberately has no paths: filter, unlike the other workflows in this
repository. A path filtered workflow reports no status on pull requests that do not
match its filter, and a required check that never reports leaves the pull request
waiting forever. This one always runs, so it can safely be marked required in the
branch ruleset.

CLAUDE.md, product-sdk/RELEASES.md, product-sdk/pending-changesets/README.md

All three said the pull request that closes the work promotes its own changeset. They
now say a separate chore(release): pull request does it, name the CI check, and warn
that the filename must not change during the move. No behaviour change, these are the
instructions people follow.

Known limitation

A release pull request passes only if it purely promotes. Authoring a new changeset inside one fails and needs a separate pull request to park the file first.

Follow up, not in this PR

Someone with admin rights needs to mark product-sdk: Changeset location as required in Settings, Rules, Rulesets, on the main branch ruleset. Until that happens the check reports red but does not block merging. Copy the check name from a completed run rather than typing it, because a ruleset entry that matches no job leaves every pull request stuck on "Expected, waiting for status to be reported".

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

📦 Bundle size impact

Comparing 2026-08-10T16:48:46.233Z2026-08-10T16:48:30.808Z

No size changes detected. 🟢

Comment thread .github/workflows/changeset-location.yml
@Imod7
Imod7 merged commit 8b97bc0 into main Aug 10, 2026
14 checks passed
al3mart added a commit to Polkadot-Community-Foundation/product-sdk that referenced this pull request Aug 14, 2026
Upstream's new changeset-location.yml (paritytech#282) runs on `parity-default`, a
Parity-only runner that does not exist in this fork, so the job queues
forever and leaves a permanently-pending check on every PR — it is
deliberately unfiltered so it can be marked required.

Same retargeting this fork already applies to the other CI workflows; the
job is just checkout + a git-diff/awk script, so ubuntu-latest is fine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants