Skip to content

Added Branches support in entry variants#199

Merged
OMpawar-21 merged 3 commits into
developmentfrom
enh/dx-7324
Jul 17, 2026
Merged

Added Branches support in entry variants#199
OMpawar-21 merged 3 commits into
developmentfrom
enh/dx-7324

Conversation

@sunil-lakshman

@sunil-lakshman sunil-lakshman commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds optional branch support to Entry.variants() and ContentType.variants(), allowing variant requests to be scoped to a specific branch without modifying the stack's global branch header.

Changes

  • Added an optional branch: str parameter to:
    • Entry.variants()
    • ContentType.variants()
  • Refactored variant header handling into:
    • _prepare_variant_headers()
    • _apply_variant_headers()
    • _cleanup_variant_headers()
  • Branch headers are now applied only for the current request and the original headers are restored afterward.

Usage

entry.variants("variant_uid", branch="dev_branch").fetch()
content_type.variants("variant_uid", branch="dev_branch").find()

# Existing behavior remains unchanged
entry.variants("variant_uid").fetch()

Co-authored-by: Om Pawar [email protected]
Co-authored-by: Claude Sonnet 4.6 [email protected]

@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 12 25 ✅ Passed
🟡 Medium Severity 0 13 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: 12
  • Medium without fixes: 13
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

harshitha-cstk
harshitha-cstk previously approved these changes May 18, 2026
reeshika-h
reeshika-h previously approved these changes May 18, 2026
cs-raj
cs-raj previously approved these changes May 18, 2026
@cs-raj
cs-raj marked this pull request as ready for review May 18, 2026 10:05
@cs-raj
cs-raj requested a review from a team as a code owner May 18, 2026 10:05
@OMpawar-21
OMpawar-21 dismissed stale reviews from cs-raj, reeshika-h, and harshitha-cstk via 1cc2bb3 July 17, 2026 08:41
@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 14 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: 14
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@OMpawar-21 OMpawar-21 changed the title Added Brancges support in entry variants Added Branches support in entry variants Jul 17, 2026
…h support

- Added integration tests (41e, 41f) in test_entry.py for branch as keyword
  arg and branch combined with query params on content_type.variants().find()
- Moved fetch-raises-without-entry-uid assertion to test_variants.py as a
  unit test (mocked, no network) where it logically belongs

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@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 14 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: 14
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@OMpawar-21
OMpawar-21 merged commit 0198f35 into development Jul 17, 2026
9 checks passed
@OMpawar-21
OMpawar-21 deleted the enh/dx-7324 branch July 17, 2026 11:32
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.

6 participants