Skip to content

feat(branch): add optional environment list to branch create (DX-31565) - #219

Merged
cs-raj merged 1 commit into
epic/DX-31560-branch-create-environmentsfrom
claude/feat/DX-31565-dotnet-branch-create-environments
Oct 28, 2026
Merged

cs-raj merged 1 commit into
epic/DX-31560-branch-create-environmentsfrom
claude/feat/DX-31565-dotnet-branch-create-environments

Conversation

@cs-raj

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

Copy link
Copy Markdown
Contributor

🤖 Opened by deveco-developer-agent (Claude). Replies from this account are the AI agent too. Review stays human. Merge: this agent merges into the epic branch after a passing reviewer verdict and green CI (MERGE=epic-branch); the final epic-to-development PR is merged by a person.

DX-31565 · Epic DX-31560

Changes

BranchModel gains an optional PublishConfig (BranchPublishConfigModel.Environments, List<string>?). Unset is omitted from the body, [] serializes as [], names pass through unvalidated and a 422 surfaces as ContentstackErrorException unchanged. Create/CreateAsync are unchanged. Version 1.2.0 and changelog.

Testing Plan

Unit and integration projects build; 10 new BranchTest tests pass (verifier re-run). Could not run: dotnet build of the .sln (MSB3030, git-ignored appSettings.json missing) and the integration tests (no credentials). Unit run has 55 failures (regions.json download blocked, one network test), identical on the base commit. QA: needs a person: test DX-31565 live (QA story DX-31570).

Known Gaps

  • The sln build and 55 unit failures above are environmental and identical on base.
  • Integration tests use placeholder environment names (development, staging) that must exist on the test stack.
  • Environment image stale: Phase 5 installed dotnet-sdk-10.0 from the Ubuntu apt archive; see environment-image.md.

Review: reviewer verdict pass on 481abb2; security pass clean. Merge order: independent of other repos' PRs.



Generated by Claude Code

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>
@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.

@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

@cs-raj
cs-raj marked this pull request as ready for review October 28, 2026 11:04
@cs-raj
cs-raj requested a review from a team as a code owner October 28, 2026 11:04
@cs-raj
cs-raj merged commit a8d0187 into epic/DX-31560-branch-create-environments 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.

2 participants