ci: exclude generated changelogs from format checks - #2976
Conversation
|
There was a problem hiding this comment.
This is the right change for the problem: Changeset-generated CHANGELOG.md files are produced by an external release workflow, so enforcing oxfmt on their aggregate output creates a formatting conflict that the release PR cannot reasonably avoid. Excluding them from oxfmt lets the project keep formatting checks on the source changesets and on the code.
I checked:
- The full
.oxfmtrc.jsondiff (only adds"**/CHANGELOG.md"toignorePatterns). package.jsonformat scripts:pnpm format/format:checkrunoxfmt --ignore-path .gitignorefollowed byprettier..prettierignore, which already ignores everything except*.astrofiles, so prettier is not a second source of markdown formatting requirements.- The existing
CHANGELOG.mdfiles, all of which are generated changeset output. - The two workflow files that invoke
oxfmt(auto-format.ymlandformat-command.yml); both rely on the sameoxfmt --ignore-path .gitignorepattern and will pick up.oxfmtrc.jsonjust like the existing ignore entries already do.
No published package behavior changes, so a changeset is not required. No tests are needed for a one-line formatter ignore pattern (a test would just re-state the config literal). The fix is minimal, targeted, and consistent with the current tooling split (oxfmt for most files, prettier for Astro only).
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/registry-moderation
@emdash-cms/registry-verification
@emdash-cms/sandbox-workerd
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-ignore-generated-changelogs.try.emdashcms.com, https://fix-ignore-generated-changelogs-emdash-playground.emdash-cms.workers.dev (commit 8feb29f)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
What does this PR do?
Excludes generated
CHANGELOG.mdfiles from oxfmt checks. Changesets generates these files when it updates the release PR, so formatting is enforced on the source changesets instead of their generated aggregate output.This unblocks release PR #2833, where the generated
packages/registry-client/CHANGELOG.mdcurrently fails the Format job.Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — Not applicable; there are no user-visible strings.AI-generated code disclosure
Screenshots / test output
Not applicable; there are no UI changes.
The targeted fixture copies the exact failing changelog and formatter config from release PR #2833:
packages/registry-client/CHANGELOG.mdas unformatted.Also verified with
pnpm lint,pnpm typecheck,pnpm format,pnpm format:check, andgit diff --check.