Skip to content

feat: entry variants branch support - #240

Merged
OMpawar-21 merged 5 commits into
developmentfrom
feat/DX-7266-variant-branch-support
Jul 24, 2026
Merged

feat: entry variants branch support#240
OMpawar-21 merged 5 commits into
developmentfrom
feat/DX-7266-variant-branch-support

Conversation

@reeshika-h

Copy link
Copy Markdown
Contributor
  • implementation

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

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

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0025✅ Passed
🟡 Medium Severity00500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

✅ BUILD PASSED - All security 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 TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0025✅ Passed
🟡 Medium Severity00500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

✅ BUILD PASSED - All security 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 TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0025✅ Passed
🟡 Medium Severity00500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

✅ BUILD PASSED - All security checks passed

@sunil-lakshmansunil-lakshman left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add version bump and changelog

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Content Management API “entry variants” support to the Java SDK, including stack-branch header propagation/overrides and publish/unpublish flows that require an api_version header, plus request-shape unit tests and fixtures.

Changes:

  • Added entry-variant endpoints to EntryService and corresponding public APIs on Entry (fetch/create/update/delete + publish/unpublish variants + branch handling helpers).
  • Introduced new unit tests and JSON fixtures to validate request paths, query params, and headers (including branch and api_version).
  • Extended shared constants/error messages to support variant-specific headers and validation.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
src/main/java/com/contentstack/cms/stack/EntryService.javaAdds Retrofit endpoints for entry-variant CRUD and adds query support to publish/unpublish.
src/main/java/com/contentstack/cms/stack/Entry.javaAdds branch/variant UID helpers and entry-variant operations, plus variant publish/unpublish helpers.
src/main/java/com/contentstack/cms/core/Util.javaAdds header constants for variant personalization and entry-variant publish API versioning.
src/main/java/com/contentstack/cms/core/ErrorMessages.javaAdds a validation message for missing Variant UID.
src/main/java/com/contentstack/cms/Contentstack.javaUpdates stack(branch) Javadoc to clarify branch header behavior and overriding.
src/test/java/com/contentstack/cms/stack/EntryVariantUnitTest.javaNew request-shape unit tests covering entry-variant endpoints and branch precedence.
src/test/java/com/contentstack/cms/stack/EntryVariantAPITest.javaNew request-shape API test suite for entry-variant operations using fixtures and branch defaults.
src/test/java/com/contentstack/cms/stack/APISanityTestSuite.javaRegisters the new entry-variant API tests in the sanity suite.
src/test/java/com/contentstack/cms/UnitTestSuite.javaRegisters the new entry-variant unit tests in the unit suite.
src/test/java/com/contentstack/cms/TestClient.javaAdds env-configurable defaults for entry-variant test content type/branch/locale.
src/test/resources/entry_variant/create_entry_variant.jsonAdds fixture payload for create variant requests.
src/test/resources/entry_variant/update_entry_variant.jsonAdds fixture payload for update variant requests.
src/test/resources/entry_variant/publish_entry_variant.jsonAdds fixture payload for publishing variants (requires api_version header).
src/test/resources/entry_variant/unpublish_entry_variant.jsonAdds fixture payload for unpublishing variants (requires api_version header).
pom.xmlChanges surefire skipTests configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpom.xml
Comment threadsrc/main/java/com/contentstack/cms/stack/Entry.java Outdated
Comment threadsrc/main/java/com/contentstack/cms/stack/Entry.java
Comment threadsrc/main/java/com/contentstack/cms/stack/Entry.java
Comment threadsrc/test/java/com/contentstack/cms/TestClient.java
Comment threadsrc/test/java/com/contentstack/cms/TestClient.java
Comment threadsrc/test/java/com/contentstack/cms/TestClient.java
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

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

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0025✅ Passed
🟡 Medium Severity00500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

✅ BUILD PASSED - All security 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 TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0025✅ Passed
🟡 Medium Severity00500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

✅ BUILD PASSED - All security checks passed

@OMpawar-21
OMpawar-21 marked this pull request as ready for review July 24, 2026 12:35
@OMpawar-21
OMpawar-21 requested a review from a team as a code ownerJuly 24, 2026 12:35
@OMpawar-21
OMpawar-21 merged commit 9163a5d into developmentJul 24, 2026
8 checks passed
@OMpawar-21
OMpawar-21 deleted the feat/DX-7266-variant-branch-support branch July 24, 2026 12:35
OMpawar-21 added a commit that referenced this pull request Aug 7, 2026
OMpawar-21 added a commit that referenced this pull request Aug 11, 2026
Sign up for freeto 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

@reeshika-h@sunil-lakshman@OMpawar-21