Skip to content

Commit

Permalink
Add support for all xsoar mps in IN121 validation (#4398)
Browse files Browse the repository at this point in the history
* Add support for all xsoar mps in IN121 validation

* add changelog
  • Loading branch information
YuvHayun authored Jul 2, 2024
1 parent f56fef4 commit 636eaf1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .changelog/4398.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Fixed an issue where IN121 in the new validate flow and IN148 in the old validate flow failed when running on content items with XSOAR on prem and XSOAR SAAS Marketplaces.
type: fix
pr_number: 4398
8 changes: 6 additions & 2 deletions demisto_sdk/commands/common/hook_validations/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,8 +1308,12 @@ def is_valid_fetch(self) -> bool:
marketplaces = get_item_marketplaces(
item_path=self.file_path, item_data=self.current_file
)
is_xsoar_marketplace = (
not marketplaces or MarketplaceVersions.XSOAR.value in marketplaces
is_xsoar_marketplace = not marketplaces or any(
[
MarketplaceVersions.XSOAR.value in marketplaces,
MarketplaceVersions.XSOAR_SAAS.value in marketplaces,
MarketplaceVersions.XSOAR_ON_PREM.value in marketplaces,
]
)
fetch_required_params = (
INCIDENT_FETCH_REQUIRED_PARAMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ def is_valid_fetch_integration(
"""
fetch_required_params = (
INCIDENT_FETCH_REQUIRED_PARAMS
if MarketplaceVersions.XSOAR in marketplaces
if any(
[
MarketplaceVersions.XSOAR in marketplaces,
MarketplaceVersions.XSOAR_SAAS in marketplaces,
MarketplaceVersions.XSOAR_ON_PREM in marketplaces,
]
)
else ALERT_FETCH_REQUIRED_PARAMS
)
current_integration = {}
Expand Down

0 comments on commit 636eaf1

Please sign in to comment.