From 2a9fbf997dac02e25523b658d9b25a7581cdb4eb Mon Sep 17 00:00:00 2001 From: sunil-lakshman <104969541+sunil-lakshman@users.noreply.github.com> Date: Tue, 4 Feb 2025 12:44:20 +0530 Subject: [PATCH 1/2] branch header support in content type (#71) * sca-scan.yml * jira.yml * sast-scan.yml * Updated codeowners * Added branch in header when provided as input to ContentType * Updated workflow file --------- Co-authored-by: Aravind Kumar --- .github/workflows/jira.yml | 2 +- .github/workflows/unit-test.yml | 2 +- CHANGELOG.md | 6 ++++++ CODEOWNERS | 2 +- LICENSE | 2 +- README.md | 2 +- contentstack_management/__init__.py | 2 +- contentstack_management/_constant.py | 2 +- contentstack_management/content_types/content_type.py | 2 ++ 9 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index caa4bbd..250abc7 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -21,7 +21,7 @@ jobs: project: ${{ secrets.JIRA_PROJECT }} issuetype: ${{ secrets.JIRA_ISSUE_TYPE }} summary: | - ${{ github.event.pull_request.title }} + Snyk | Vulnerability | ${{ github.event.repository.name }} | ${{ github.event.pull_request.title }} description: | PR: ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 5bc4ce1..dd3a8ea 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -33,7 +33,7 @@ jobs: coverage-badge -o coverage.svg - name: Upload coverage artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: coverage-report path: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 86e3545..dcf58c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Content Management SDK For Python --- +## v1.3.1 + +#### Date: 06 February 2025 + +- Added branch in header when provided as input to ContentType. +--- ## v1.3.0 #### Date: 04 September 2024 diff --git a/CODEOWNERS b/CODEOWNERS index 0773923..1be7e0d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @contentstack/security-admin \ No newline at end of file +* @contentstack/security-admin diff --git a/LICENSE b/LICENSE index d7136f5..df869da 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2012 - 2024 Contentstack. All rights reserved. +Copyright (c) 2012 - 2025 Contentstack. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 1bb3550..0d3ab80 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ result = asset.upload(asset) - [Content Management API Docs](https://www.contentstack.com/docs/developers/apis/content-management-api) ### The MIT License (MIT) -Copyright © 2012-2024 [Contentstack](https://www.contentstack.com/). All Rights Reserved +Copyright © 2012-2025 [Contentstack](https://www.contentstack.com/). All Rights Reserved Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/contentstack_management/__init__.py b/contentstack_management/__init__.py index c98a314..91077eb 100644 --- a/contentstack_management/__init__.py +++ b/contentstack_management/__init__.py @@ -72,7 +72,7 @@ __author__ = 'ishaileshmishra' __status__ = 'debug' __region__ = 'na' -__version__ = '1.3.0' +__version__ = '1.3.1' __host__ = 'api.contentstack.io' __protocol__ = 'https://' __api_version__ = 'v3' diff --git a/contentstack_management/_constant.py b/contentstack_management/_constant.py index f08fd8b..e1ed803 100644 --- a/contentstack_management/_constant.py +++ b/contentstack_management/_constant.py @@ -16,7 +16,7 @@ def _default_user_agent(): }, 'app': { 'name': 'contentstack-management.python', - 'version': '1.0.0' + 'version': sys.version_info }, 'platform': { 'name': 'python', diff --git a/contentstack_management/content_types/content_type.py b/contentstack_management/content_types/content_type.py index 753204e..ba79bd9 100644 --- a/contentstack_management/content_types/content_type.py +++ b/contentstack_management/content_types/content_type.py @@ -20,6 +20,8 @@ def __init__(self, client, content_type_uid=None, branch = None): self.client = client self.content_type_uid = content_type_uid self.branch = branch + if self.branch: + self.add_header('branch', branch) super().__init__(self.client) def find(self): From a258d3d15f88efe318cb67305701a2d4cdfb54c2 Mon Sep 17 00:00:00 2001 From: sunil-lakshman <104969541+sunil-lakshman@users.noreply.github.com> Date: Tue, 11 Feb 2025 17:19:15 +0530 Subject: [PATCH 2/2] Back Merge (#74) * sca-scan.yml * jira.yml * sast-scan.yml * Updated codeowners --------- Co-authored-by: Aravind Kumar