Repository navigation
feat(branches): add optional environments list to branch create (DX-31563) - #194
Merged
cs-raj merged 1 commit intoOct 28, 2026
Conversation
Branch create accepts an optional branch.publish_config.environments list of environment
names so a caller can clone only the environments it needs. An empty list clones none.
Omitting publish_config sends the same body as before and clones all environments. The
SDK passes the list through unvalidated and adds no length limit; an unknown name or a
mix returns the API's 422 response unchanged and no branch is created.
Documents the field and its three behaviors in the create docstring with an example.
Adds mocked unit tests for the posted body (two names, [], duplicates, a 150-name list,
mixed case, omitted, publish_config {}) and for a 422 returned unchanged, plus sanity
integration tests for create with two names, [], an unknown name and a mix (not run
here). Bumps the minor version to 1.12.0 and adds a changelog entry.
Refs: DX-31563
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
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
cs-raj
marked this pull request as ready for review
October 28, 2026 11:09
cs-raj
merged commit Oct 28, 2026
12f76cf
into
epic/DX-31560-branch-create-environments
9 checks passed
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-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-developmentPR is merged by a person.DX-31563 · Epic DX-31560
Changes
branches().create()already posts the caller's data unchanged, so an optionalpublish_config.environmentslist passes through: two names clone only those,[]clones none, omitting it sends today's body, and the API's 422 comes back unchanged. No runtime change: the create docstring documents the three behaviours with an example, plus unit and integration tests. Version 1.12.0 and changelog.Testing Plan
6 new mocked unit tests pass (a mutation check that strips
publish_configmakes them fail); pylint onbranches.pyunchanged from base. Not run: integration tests (no credentials); the other unit tests fail identically on base (live network blocked). QA: needs a person: test DX-31563 live (QA story DX-31568).Known Gaps
Review: reviewer verdict pass on
80a1a84; security pass clean. Merge order: independent of other repos' PRs.Generated by Claude Code