Skip to content

Added branches support in entry variants - #153

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

Added branches support in entry variants#153
OMpawar-21 merged 3 commits into
developmentfrom
enh/dx-7265

Conversation

@sunil-lakshman

@sunil-lakshmansunil-lakshman commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds branch support for Entry Variants and introduces publish/unpublish APIs.

Changes

  • Added optional branch support for all Entry Variant operations:
    • find()
    • fetch()
    • create()
    • update()
    • delete()
    • versions()
    • includeVariants()
    • publish()
    • unpublish()
  • Added publish() and unpublish() methods to EntryVariants.
  • Reworked Entry.variants() to support:
    • variants()
    • variants(branch_uid)
    • variants(variant_uid, branch_uid)

Files Changed

FileChanges
entry_variants/entry_variants.pyAdded branch support, _headers() helper, and implemented publish() & unpublish().
entries/entry.pyUpdated variants() to support branch-aware signatures.
tests/unit/entry_variants/test_entry_variants.pyAdded unit tests for branch headers, publish, and unpublish.
CHANGELOG.mdUpdated changelog for v1.9.0.

Test Plan

  • variants('branch_uid').find() sends the branch header.
  • variants(variant_uid, 'branch_uid').fetch() sends the variant UID in the URL and the branch header.
  • variants().publish(data) sends a POST request to the /publish endpoint with the correct payload.
  • variants().unpublish(data) sends a POST request to the /unpublish endpoint with the correct payload.
  • variants('main').publish(data) includes the branch header.
  • variants('a', 'b', 'c') raises a TypeError.
  • When no branch is provided, _headers() returns the original client headers without mutation.

@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 Severity0125✅ Passed
🟡 Medium Severity03500✅ 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

ℹ️ 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: 1
  • Medium without fixes: 3
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

cs-raj
cs-raj previously approved these changes May 14, 2026
Comment threadcontentstack_management/entries/entry.py
reeshika-h
reeshika-h previously approved these changes May 14, 2026
harshitha-cstk
harshitha-cstk previously approved these changes May 15, 2026
@OMpawar-21
OMpawar-21 changed the base branch from development to mainJuly 15, 2026 03:06
@OMpawar-21
OMpawar-21 dismissed stale reviews from harshitha-cstk, reeshika-h, and cs-rajJuly 15, 2026 03:06

The base branch was changed.

@OMpawar-21
OMpawar-21 changed the base branch from main to developmentJuly 15, 2026 03:07
@OMpawar-21
OMpawar-21 changed the base branch from development to mainJuly 16, 2026 12:00
@OMpawar-21
OMpawar-21 changed the base branch from main to developmentJuly 16, 2026 12:04
@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 Severity0125✅ Passed
🟡 Medium Severity04500✅ 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

ℹ️ 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: 1
  • Medium without fixes: 4
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@OMpawar-21
OMpawar-21 marked this pull request as ready for review July 16, 2026 12:38
@OMpawar-21
OMpawar-21 requested a review from a team as a code ownerJuly 16, 2026 12:38
@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 Severity0125✅ Passed
🟡 Medium Severity04500✅ 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

ℹ️ 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: 1
  • Medium without fixes: 4
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@OMpawar-21
OMpawar-21 merged commit 2bc2ce1 into developmentJul 17, 2026
8 checks passed
@OMpawar-21
OMpawar-21 deleted the enh/dx-7265 branch July 17, 2026 09:31
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.

5 participants

@sunil-lakshman@cs-raj@reeshika-h@OMpawar-21@harshitha-cstk