Repository navigation
feat(branch): environment list on branch create (DX-31564) - #275
Conversation
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 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
✅ BUILD PASSED - All security checks passed |
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>
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
01ea18f
into
epic/DX-31560-branch-create-environments
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
What
Branch create accepts an optional
branch.publish_config.environmentslist: 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 liveBranchAPITest. No validation or length limit is added; the API's 422 body is returned unchanged.Changes
Branch.java: create JavadocBranchUnitTest.java(nowpublic) +UnitTestSuite.javaregistration, so the run actually executes it (amendment approved on DX-31564)BranchAPITest.java, added toAPISanityTestSuite.java; skips without credentialspom.xml1.15.0 → 1.16.0,changelog.mdVerified
UnitTestSuitewithskipTestsoverridden on a temp pom copy: 293 run (base: 265; +28BranchUnitTest), 0 failures, 2 errors that are identical on the epic branch (ContentstackUnitTest.testClientDefaultHeaders,TaxonomyTest.findTestAPI: proxy CONNECT 403 to hosts outside this environment).BranchAPITest: not run: needs credentials. Proved later by QA story DX-31569.Note
pom.xmlhard-codes surefire<skipTests>true</skipTests>, so-DskipTests=falsealone still runs zero tests. Out of scope here; needs its own ticket.Refs: DX-31564
Generated by Claude Code