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

Improve Fetch incidents structure and add append notes funcitonality #33912

Merged
merged 5 commits into from Apr 11, 2024

Conversation

content-bot
Copy link
Collaborator

Original External PR

external pull request

Contributor

@DNRRomero

Contributing to Cortex XSOAR Content

Make sure to register your contribution by filling the contribution registration form

The Pull Request will be reviewed only after the contribution registration form is filled.

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

fixes: link to the issue

Description

A few sentences describing the overall goals of the pull request's commits.

Must have

  • Tests
  • Documentation

…33436)

* fix duplicate alerts (#123)

* Simplify fetch_incidents method to avoid duplicate incidents

change alert ids to str to facilitate storage and comparison
add set to avoid duplicates
delete unnecessary timestamp fields in last_run
reduce fetch_incidents to a single http call to alerts endpoint

* Add PR comments on fixing type hints and polishing tests

---------

Co-authored-by: Diego Ramirez <dramirez@zerofox.com>

* fix pre-commit formatting issues

* remove get_alert_attachment command

remove get_alert_attachment_command to avoid confusing customers

* Add notes append test

* format according to autopep8

* Update app versioning and add release notes

* Change release version to 2.0.0 due to breaking compatibility

* Undo version bump to 2.0.0 as it was not required, move back to 1.3.1 and mark as breaking change

* Restore get_alert_attachments command and mark as deprecated, as per PR comments

* Add sort field for fetching alerts given last_modified_min_date
@content-bot content-bot added Contribution Thank you! Contributions are always welcome! Partner pending-demo Demo pending Contribution Form Filled Whether contribution form filled or not. pending-contributor The PR is pending the response of its creator Partner Support Level Indicates that the contribution is for Partner supported pack Internal PR Partner-Approved TIM Review labels Apr 11, 2024
Copy link

github-actions bot commented Apr 11, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
Packs/ZeroFox/Integrations/ZeroFox
   ZeroFox.py6416989%79, 87, 108–113, 115, 122, 152, 190, 615–616, 635–636, 777, 1142, 1150, 1158, 1182, 1193–1194, 1263–1264, 1311, 1435, 1493–1494, 1498, 1501, 1521, 1539, 1572, 1672, 1696, 1759, 1789, 1819, 1843, 1866, 1882–1885, 1890, 1893–1896, 1898, 1927–1929, 1940, 1942–1946, 1951–1956, 1958, 1961–1962
TOTAL6416989% 

Tests Skipped Failures Errors Time
34 0 💤 0 ❌ 0 🔥 2.965s ⏱️

@merit-maita merit-maita merged commit e77c5bf into master Apr 11, 2024
17 checks passed
@merit-maita merit-maita deleted the contrib/DNRRomero_fix_duplicates branch April 11, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution Form Filled Whether contribution form filled or not. Contribution Thank you! Contributions are always welcome! docs-approved Internal PR Partner Support Level Indicates that the contribution is for Partner supported pack Partner Partner-Approved pending-contributor The PR is pending the response of its creator pending-demo Demo pending TIM Review
Projects
None yet
4 participants