fix(generate): authenticated spec fetch (openapi is private) - #49
Merged
Conversation
raw.githubusercontent.com/hanzoai/openapi/main/hanzo.yaml 404s (openapi is a private repo), so every spec-update regen failed at the fetch. Fetch hanzo.yaml through the GitHub Contents API with a SPEC_TOKEN (repo/contents:read on hanzoai/openapi) instead. Local SPEC=... override unchanged.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
spec-updateregeneration failed at the fetch step:scripts/generate.shpulled the spec fromraw.githubusercontent.com/hanzoai/openapi/main/hanzo.yaml, which 404s because hanzoai/openapi is a private repo.Fix: fetch
hanzo.yamlthrough the GitHub Contents API with aSPEC_TOKEN(repo/contents:read on hanzoai/openapi), passed to the Regenerate step via the repo secretSPEC_TOKEN(already set). The localSPEC=/pathoverride is unchanged.Proven end-to-end: with this script,
openapi-generator 7.14.0regenerates the SDK from the currenthanzo.yamlincluding the new usage-cap/promo types (SpendAlert, CapVerdict, Promo). Paired with hanzoai/openapi@main which fixed the dart/ts generator crashes + the dispatch token.Rotate
SPEC_TOKENto a KMS-synced long-lived PAT.