Repository navigation
fix(variables): add --no-vars to the create commands and scope the stack picker to the organization (+Claude) - #252
Merged
Merged
Conversation
…ack picker to the organization Follow-up to the post-merge review of #245. projects:create and env:create on a terminal always showed the "Add environment variables" checklist when no variable source was given, so a fully flagged create could not finish without someone picking Skip. --no-vars is the flag form of that Skip choice: it sends an empty list without asking. Combined with --var, --dotenv or --from-stack it is a usage error from the new noVarsAlone rule; oclif's exclusive was not used because --help would then show the three sources excluding each other. fetchStacks passed organization_uid to query(), where the SDK sends it as a plain query parameter. It now scopes the stack handle with stack({ organization_uid }), which the SDK sends as the organization_uid header and an org_uid query filter, as the CMA documents for listing an organization's stacks. StacksApi.list also drops any stack whose org_uid names another organization. V1 made the same call, so this is not a regression of #245. AGENTS.md and the README describe --no-vars and the organization scope. The .talismanrc checksums are refreshed for every changed file it flags (flag names, fixture stack keys and the words error/token in prose, no secret); projects-create.test.ts moves from per-line allowed_patterns to a checksum entry. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Sakshi Koli <sakshi.koli@contentstack.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
SakshiKoli-CS
approved these changes
Oct 26, 2026
rohan-agrawal-cs
approved these changes
Oct 26, 2026
SakshiKoli-CS
added a commit
that referenced
this pull request
Oct 26, 2026
Brings in #252 (--no-vars on the create commands, the stack picker scoped to the organization). The only conflict was the AGENTS.md checksum in .talismanrc: both branches edited AGENTS.md in different sections, so the merged file gets a fresh checksum rather than either side's. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> Co-Authored-By: Claude <noreply@anthropic.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.
What
Follow-up to the post-merge review of #245 (CL-7169). Two fixes:
--no-varsonprojects:createandenv:create. With no variable source given, these commands always showed the "Add environment variables" checklist on a terminal, so a create with every other value passed as a flag still stopped at a checklist.--no-varsis the flag form of the checklist's "Skip adding environment variables" choice (TRD §4.9.3: nothing is reachable through only one path). It sends an empty list without asking. Combined with--var,--dotenvor--from-stackit is a usage error (exit 2) from the newnoVarsAlonerule. I didn't use oclif'sexclusive, because--helpwould then show the three sources as excluding each other.--from-stacklists only the organization's stacks.fetchStackspassedorganization_uidtoquery(), where the SDK sends it as a plain query parameter. It now callsstack({ organization_uid }), which the SDK sends as theorganization_uidheader plus anorg_uidquery filter.StacksApi.listalso drops any stack whoseorg_uidnames another organization. V1 made the same call (base-class.tsselectStack), so this isn't a regression from feat(variables): add launch:variables list, set and unset #245.AGENTS.md and the README (
oclif readme) describe both changes..talismanrcchecksums are refreshed for the changed files it flags;projects-create.test.tsmoves from per-lineallowed_patternsto a checksum entry.The review's other findings: the PUT race and the double GET were fixed in #247, and the separator split in #249. The upload-before-validation order and
--dotenvbeing relative to the current folder are left as they are; the reasons are in the review threads.Tests
--no-varsparsing andnoVarsAlone,variablesForCreateasking and reading nothing with--no-vars, the stack handle carrying the organization, and stacks from another organization being dropped.--no-varsasks nothing and sendsenvironmentVariables: [](projects and env), and--no-vars --varexits 2 before any request. The stack-picker mocks now expect theorganization_uidheader.npm test: 139 suites, 2419 tests pass. Lint,tscand build pass.npm run test:coverage: every changed file is at 100%. The global branch threshold reports 99.96%, because of one uncovered branch insrc/core/failure.ts:66(handleStandaloneFailure, from fix(environments): one error line per failure, an org check on the project, and FileUpload-aware env output #248). This PR doesn't touch that file.--from-stackon an account in several organizations.#claude_code#
🤖 Generated with Claude Code