Skip to content

Commit

Permalink
Add add_comment to PerformIncidentAction operation. Closes #1003.
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Sep 1, 2023
1 parent 64117d9 commit dc590d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/falconpy/_payload/_incidents.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def incident_action_parameters(passed_keywords: dict) -> list:
"""Create a properly formatted action_parameters branch for incident action payload operations.
Available keywords
add_comment - Adds the associated value as a new cmoment on all the incidents in the ids list.
add_tag - Adds the associated value as a new tag on all the incidents of the ids list.
Multiple tags may be provided as a list or comma delimited string.
delete_tag - Deletes tags matching the value from all the incidents in the ids list.
Expand Down Expand Up @@ -79,7 +80,7 @@ def incident_action_parameters(passed_keywords: dict) -> list:
returned_payload = []
valid_keywords = [
"add_tag", "delete_tag", "unassign", "update_name", "update_assigned_to_v2",
"update_description", "update_status"
"update_description", "update_status", "add_comment"
]
for key, val in passed_keywords.items():
if key in valid_keywords and key != "unassign":
Expand Down
1 change: 1 addition & 0 deletions src/falconpy/incidents.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def perform_incident_action(self: object,
Keyword arguments:
action_parameters -- Action specific parameters. List of dictionaries.
add_comment -- Adds the provided value as a new comment on all the incidents in the ids list. String.
add_tag -- Adds the associated value as a new tag on all the incidents of the ids list.
Overridden if action_parameters is specified. Multiple values may be provided.
String, comma delimited string, or list.
Expand Down
1 change: 1 addition & 0 deletions tests/test_incidents.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def serviceIncidents_GenerateErrors(self):
["PerformIncidentAction", falcon.perform_incident_action(action_parameters=[
{"name": "whatever", "value": "something"}
],
add_comment="Something",
add_tag="Something",
delete_tag="something",
update_name="something",
Expand Down

0 comments on commit dc590d6

Please sign in to comment.