Skip to content

feat(branch): environment list on branch create (DX-31564) - #275

Merged
cs-raj merged 3 commits into
epic/DX-31560-branch-create-environmentsfrom
claude/feat/DX-31564-java-branch-create-environments
Oct 28, 2026
Merged

cs-raj merged 3 commits into
epic/DX-31560-branch-create-environmentsfrom
claude/feat/DX-31564-java-branch-create-environments

Conversation

@cs-raj

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

Copy link
Copy Markdown
Contributor

🤖 Authored by the Developer agent (Claude) for Epic DX-31560. A person reviews and merges the epic branch into development.

What
Branch create accepts an optional branch.publish_config.environments list: a list clones only those environments, [] clones none, omitting it clones all (unchanged). The SDK already passed the body through; this adds the Javadoc with an example, unit tests, and a new live BranchAPITest. No validation or length limit is added; the API's 422 body is returned unchanged.

Changes

  • Branch.java: create Javadoc
  • BranchUnitTest.java (now public) + UnitTestSuite.java registration, so the run actually executes it (amendment approved on DX-31564)
  • New BranchAPITest.java, added to APISanityTestSuite.java; skips without credentials
  • pom.xml 1.15.0 → 1.16.0, changelog.md

Verified

  • UnitTestSuite with skipTests overridden on a temp pom copy: 293 run (base: 265; +28 BranchUnitTest), 0 failures, 2 errors that are identical on the epic branch (ContentstackUnitTest.testClientDefaultHeaders, TaxonomyTest.findTestAPI: proxy CONNECT 403 to hosts outside this environment).
  • Live BranchAPITest: not run: needs credentials. Proved later by QA story DX-31569.

Note
pom.xml hard-codes surefire <skipTests>true</skipTests>, so -DskipTests=false alone still runs zero tests. Out of scope here; needs its own ticket.

Refs: DX-31564


Generated by Claude Code

Branch create accepts an optional branch.publish_config.environments list of
environment names. The runtime already passes the body through unchanged, so
this change adds the Javadoc for the three behaviors (a list, [], and omitted),
unit tests that pin the request body and the mocked 422 and fetch paths, and
a live BranchAPITest that creates, fetches and deletes branches against a real
stack (it skips without credentials). The SDK adds no validation or length
limit; the API's error body is returned unchanged. Bumps the version to 1.16.0
and adds a changelog entry.

Refs: DX-31564

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

claude and others added 2 commits October 28, 2026 11:55
Branch UIDs allow 15 lowercase letters and digits; the long run-id UIDs
would have made the create calls fail for the wrong reason. Also assert the
422 body names publish_config.environments and register created UIDs for
cleanup before asserting.

Refs: DX-31564

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>

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XifDUX2vy4ahCznNWQ2P3S
Refs: DX-31564

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>
@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:57
@cs-raj
cs-raj requested a review from a team as a code owner October 28, 2026 11:57
@cs-raj
cs-raj merged commit 01ea18f into epic/DX-31560-branch-create-environments Oct 28, 2026
9 checks passed
@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

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