Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for all xsoar mps in IN121 validation #4398

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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