fix: add required acceptTerms field to workspace create body - #13
Open
polylane[bot] wants to merge 1 commit into
Open
fix: add required acceptTerms field to workspace create body#13polylane[bot] wants to merge 1 commit into
polylane[bot] wants to merge 1 commit into
Conversation
Co-authored-by: polylane[bot] <277585245+polylane[bot]@users.noreply.github.com>
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.
🟡 Fixes: CI failing: CI on coreplanelabs/cli@main
active for 5m
fix_fc50f5…CI on the main branch was failing the typecheck step. The workspace-create command builds the request body for creating a workspace, but the generated API client recently began requiring an explicit terms-acceptance flag on that body. The command was omitting it, so TypeScript rejected the call and the build failed. This change sets that flag, matching the command's existing behavior of accepting terms on the user's behalf.
What changed
src/commands/workspace/create.ts— addedacceptTerms: trueto theCreateWorkspaceBodyliteral passed toworkspacesPost, satisfying the generated client's required field.Validation
npm run typecheck— pass (pretypecheck codegen + strict typecheck)Root cause, safety reasoning, and scoping notes
Root cause
The generated client type
CreateWorkspaceBodymarksacceptTermsas required (acceptTerms: true). The command already writes a terms-of-service notice to stderr and implicitly accepts terms on the user's behalf, so setting the field is the correct behavior — not a paper-over.Why it's safe
Additive field set in a request body; no schema, config, or interface change. The command already displayed a terms-of-service notice and accepted on the user's behalf — this just sets the field the API now requires.
Out of scope / follow-ups
The GitHub Actions warning about Node.js 20 deprecation in
.githubis a runner environment concern outside this repository's code and was not touched.1 file changed (+1/-1)
src/commands/workspace/create.ts: modified, +1/-1Generated by Polylane.