Skip to content

feat: lint:spec command + changelog generation (Phase 3 hub side)#5

Merged
dean-harel-unipaas merged 1 commit into
mainfrom
feat/lint-and-changelog
Jun 10, 2026
Merged

feat: lint:spec command + changelog generation (Phase 3 hub side)#5
dean-harel-unipaas merged 1 commit into
mainfrom
feat/lint-and-changelog

Conversation

@dean-harel-unipaas

Copy link
Copy Markdown
Contributor

The hub-side half of the gates/changelog work: it owns the lint command and generates the changelog.

lint:spec is now the single-source lint command

"lint:spec": "spectral lint --ruleset .spectral.yaml --fail-severity error", called as npm run lint:spec -- <file>. The ruleset, the Spectral engine/version, and the severity all live here, so the producer's pre-merge gate (next) just runs this command rather than pinning its own Spectral. Errors fail; warnings don't.

Changelog on publish

publish.ts diffs the previous published spec against the incoming one (oasdiff changelog ... -f markdown) and prepends a ## <tag> (<date>) entry to CHANGELOG.md, also folding the diff into the release notes. Best-effort: if oasdiff is absent or errors, it falls back to a neutral note rather than failing the publish. CHANGELOG.md is reset to a clean header so entries prepend cleanly (newest on top).

Verification

  • npm run typecheck clean, npm test 11/11, npm run lint:spec -- spec/openapi.json runs (no crash).
  • Prepend format verified (header fixed on top, newest entry first).
  • The real oasdiff diff populates once it's installed in the producer's publish job (the remaining producer-side bit); until then entries read "No API-surface changes detected." / "Initial published spec."

@dean-harel-unipaas
dean-harel-unipaas merged commit 293ca62 into main Jun 10, 2026
1 check passed
@dean-harel-unipaas
dean-harel-unipaas deleted the feat/lint-and-changelog branch June 10, 2026 20:41
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.

1 participant