Skip to content

feat(branch): optional environment list on branch create (DX-31560) - #220

Merged
cs-raj merged 2 commits into
developmentfrom
epic/DX-31560-branch-create-environments
Oct 28, 2026
Merged

cs-raj merged 2 commits into
developmentfrom
epic/DX-31560-branch-create-environments

Conversation

@cs-raj

@cs-raj cs-raj commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

🤖 Opened by deveco-dev (Claude). Review and merge stay with a person (MERGE=denied for this PR).

Changes: BranchModel gains an optional PublishConfig with 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 uncommitted appSettings.json in the integration-test project. Live tests not run; QA story DX-31570.

Known Gaps:

  • Build and the one failing test not compared with a baseline run on development.

Merge order: independent of the other three SDK PRs.


Generated by Claude Code

claude and others added 2 commits October 28, 2026 10:59
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)
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

@snyk-io

snyk-io Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cs-raj
cs-raj marked this pull request as ready for review October 28, 2026 12:28
@cs-raj
cs-raj requested a review from a team as a code owner October 28, 2026 12:28
@cs-raj
cs-raj merged commit e601000 into development Oct 28, 2026
10 checks passed
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.

4 participants