Skip to content

Add support for variant branches in Entry and Query classes#108

Draft
reeshika-h wants to merge 4 commits into
developmentfrom
feat/DX-7327-variants-branch-support
Draft

Add support for variant branches in Entry and Query classes#108
reeshika-h wants to merge 4 commits into
developmentfrom
feat/DX-7327-variants-branch-support

Conversation

@reeshika-h

Copy link
Copy Markdown
Contributor

Introduce functionality to handle variant branches in the Entry and Query classes, enhancing the ability to scope requests to specific branches. Update tests to validate the new behavior.

@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 2 25 ✅ Passed
🟡 Medium Severity 0 8 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

ℹ️ 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:

  • Critical without fixes: 0
  • High without fixes: 2
  • Medium without fixes: 8
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

harshitha-cstk
harshitha-cstk previously approved these changes May 15, 2026

@sunil-lakshman sunil-lakshman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Copilot AI 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

Adds variant-branch scoping support to the Android Delivery SDK’s request builders by extending Entry and Query with new variants(..., branch) overloads, and updates tests/config to exercise the new behavior.

Changes:

  • Added variants(String variantUid, String branch) and variants(String[] variantUids, String branch) overloads to Query and Entry that set x-cs-variant-uid and branch headers.
  • Added/expanded unit tests to validate header-setting behavior for variants with and without branch.
  • Added new Android instrumentation test cases and a BuildConfig field (variantBranch) to drive integration tests.

Reviewed changes

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

Show a summary per file
File Description
contentstack/src/main/java/com/contentstack/sdk/Query.java Adds variants(..., branch) overloads that populate x-cs-variant-uid and branch headers.
contentstack/src/main/java/com/contentstack/sdk/Entry.java Adds variants(..., branch) overloads for entries to set variant + branch headers.
contentstack/src/test/java/com/contentstack/sdk/TestQuery.java Adds Robolectric unit tests for Query.variants(...) header behavior, including branch handling.
contentstack/src/test/java/com/contentstack/sdk/TestEntryComprehensive.java Adds Robolectric unit tests for Entry.variants(..., branch) header behavior.
contentstack/src/androidTest/java/com/contentstack/sdk/QueryTestCase.java Adds instrumentation coverage calling Query.variants(...) before find().
contentstack/src/androidTest/java/com/contentstack/sdk/EntryTestCase.java Adds instrumentation coverage calling Entry.variants(..., branch) before fetch().
contentstack/build.gradle Introduces BuildConfig.variantBranch for debug builds to support new instrumentation tests.

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

Comment thread contentstack/src/main/java/com/contentstack/sdk/Entry.java
…assumptions and assertions for better validation
@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 2 2 25 ✅ Passed
🟡 Medium Severity 1 8 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 2 0 30 / 120 days ❌ Failed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

🟠 High Severity - SLA Breached Issues (with fixes)

Showing 2 issue(s) that have exceeded the 30-day SLA threshold:

  1. Timing Attack

    • ID: SNYK-JAVA-ORGBOUNCYCASTLE-16074612
    • Package: org.bouncycastle:bcprov-jdk18on@1.80
    • Published: 89 days ago (SLA: 30 days)
    • CVSS Score: 8.2
    • CVE: CVE-2026-5598
  2. Use of a Broken or Risky Cryptographic Algorithm

    • ID: SNYK-JAVA-ORGBOUNCYCASTLE-16075266
    • Package: org.bouncycastle:bcprov-jdk18on@1.80
    • Published: 89 days ago (SLA: 30 days)
    • CVSS Score: 8.7
    • CVE: CVE-2025-14813

ℹ️ 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:

  • Critical without fixes: 0
  • High without fixes: 2
  • Medium without fixes: 8
  • Low without fixes: 0

❌ BUILD FAILED - Security checks failed

Please review and fix the security vulnerabilities before merging.

@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 2 2 25 ✅ Passed
🟡 Medium Severity 1 8 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 2 0 30 / 120 days ❌ Failed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

🟠 High Severity - SLA Breached Issues (with fixes)

Showing 2 issue(s) that have exceeded the 30-day SLA threshold:

  1. Timing Attack

    • ID: SNYK-JAVA-ORGBOUNCYCASTLE-16074612
    • Package: org.bouncycastle:bcprov-jdk18on@1.80
    • Published: 89 days ago (SLA: 30 days)
    • CVSS Score: 8.2
    • CVE: CVE-2026-5598
  2. Use of a Broken or Risky Cryptographic Algorithm

    • ID: SNYK-JAVA-ORGBOUNCYCASTLE-16075266
    • Package: org.bouncycastle:bcprov-jdk18on@1.80
    • Published: 89 days ago (SLA: 30 days)
    • CVSS Score: 8.7
    • CVE: CVE-2025-14813

ℹ️ 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:

  • Critical without fixes: 0
  • High without fixes: 2
  • Medium without fixes: 8
  • Low without fixes: 0

❌ BUILD FAILED - Security checks failed

Please review and fix the security vulnerabilities before merging.

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

ℹ️ 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:

  • Critical without fixes: 0
  • High without fixes: 0
  • Medium without fixes: 7
  • Low without fixes: 0

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

5 participants