Repository navigation
feat(branch): optional environment list on branch create (DX-31560) - #220
Merged
Merged
Conversation
Branch create can now clone only the environments a caller needs. BranchModel gains PublishConfig (BranchPublishConfigModel) with an Environments list of environment names, not UIDs. Two names clone only those two; an empty list clones none; leaving PublishConfig unset sends the same body as before and clones all environments. The SDK passes the list through unvalidated, adds no length limit, and surfaces the API's 422 error unchanged (ContentstackErrorException with message, error code and errors); no branch is created on rejection. A fetched branch carries the list the API returns. Adds the create XML docs for these behaviors, unit tests for the request body (two names, empty list, unset), the 422 path and fetch deserialization, and integration tests for two names, an empty list, an unknown name and a mix (written, not run). Bumps the version to 1.2.0 and adds a changelog entry. Refs: DX-31565 Co-authored-by: Raj Pandey <raj.pandey@contentstack.com> Co-authored-by: Reeshika Hosmani <reeshika.hosmani@contentstack.com> Co-authored-by: Aniket Shikhare <aniket.shikhare@contentstack.com> Co-authored-by: Claude <noreply@anthropic.com>
…-branch-create-environments feat(branch): add optional environment list to branch create (DX-31565)
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
✅ 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. |
cs-raj
marked this pull request as ready for review
October 28, 2026 12:28
reeshika-h
approved these changes
Oct 28, 2026
aniket-shikhare-cstk
approved these changes
Oct 28, 2026
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.
🤖 Opened by
deveco-dev(Claude). Review and merge stay with a person (MERGE=deniedfor this PR).Changes:
BranchModelgains an optionalPublishConfigwith an environment list (all by default, none with[], or a list). Unset omits the key, so existing requests are unchanged. Epic DX-31560 (PR #219 merged into this branch). Version 1.2.0.Testing Plan: Unit tests 1359 pass, 1 fails (
EntryTest.Should_Export_Throw_OnError, a pre-existing test that calls the live API; sandbox proxy 403). Solution build fails only on a missing uncommittedappSettings.jsonin the integration-test project. Live tests not run; QA story DX-31570.Known Gaps:
development.Merge order: independent of the other three SDK PRs.
Generated by Claude Code