Skip to content

Release via GitHub REST API (drop the gh binary); trim README#8

Merged
dean-harel-unipaas merged 2 commits into
mainfrom
chore/publish-via-rest
Jun 10, 2026
Merged

Release via GitHub REST API (drop the gh binary); trim README#8
dean-harel-unipaas merged 2 commits into
mainfrom
chore/publish-via-rest

Conversation

@dean-harel-unipaas

Copy link
Copy Markdown
Contributor

What

  • publish.ts now creates the release and uploads both spec assets (openapi.json, openapi.yaml) through the GitHub REST API, using the installation token the producer's CI already mints. The producer's publish job no longer needs the gh CLI, so its checksum-verified tarball install and GH_VER pin go away (separate platform-api MR).
  • GITHUB_API_URL is overridable (GitHub Enterprise / tests); default unchanged.
  • main() exits explicitly once settled, so fetch's keep-alive socket pool can't hold the event loop open after a publish.
  • README trimmed to an intro + a consume-the-spec block, and now links the OpenAPI Specification v3.0 it conforms to.

Verification

Typecheck + unit tests green. The full publish flow (changed / unchanged / stale) was exercised end-to-end against a mock GitHub API and a local git remote: release create, two asset uploads with templates stripped and octet-stream bodies, Bearer auth on every call, changelog prepend, commit + push, idempotent no-op, and stale skip. That simulation caught and fixed the keep-alive hang noted above.

No change to the published spec or release tag scheme; consumers are unaffected.

Create the release and upload both spec assets through api.github.com using
the installation token the producer's CI already mints, so the publish job
needs no gh binary (and no checksum-verified tarball install). GITHUB_API_URL
is overridable for GitHub Enterprise and tests. main() exits explicitly once
settled so fetch's keep-alive socket pool can't keep the process alive.
@dean-harel-unipaas
dean-harel-unipaas merged commit ab2d071 into main Jun 10, 2026
1 check passed
@dean-harel-unipaas
dean-harel-unipaas deleted the chore/publish-via-rest branch June 10, 2026 22:05
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