Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
trello: Ignore updateCheckItem/updateList actions.
Steve Howellbfe04ff6cfab
diff --git a/zerver/webhooks/trello/tests.py b/zerver/webhooks/trello/tests.pyindex 4a79a025dfb..f94c09c4081 100644--- a/zerver/webhooks/trello/tests.py+++ b/zerver/webhooks/trello/tests.py@@ -112,21 +112,26 @@ class TrelloHookTests(WebhookTestCase):payload = self.get_body('change_board_background_image')self.verify_post_is_ignored(payload)- def test_create_card_check_item_ignore(self) -> None:+ def test_ignored_card_actions(self) -> None:"""Certain card-related actions are now ignored solely based on theaction type, and we don't need to do any other parsing to ignorethem as invalid."""- action = "createCheckItem"- data = dict(- model="whatever",- action=dict(- type=action,- ),- )- payload = orjson.dumps(data).decode()- self.verify_post_is_ignored(payload)+ actions = [+ "createCheckItem",+ "updateCheckItem",+ "updateList",+ ]+ for action in actions:+ data = dict(+ model="whatever",+ action=dict(+ type=action,+ ),+ )+ payload = orjson.dumps(data).decode()+ self.verify_post_is_ignored(payload)def test_trello_webhook_when_description_was_added_to_card(self) -> None:expected_message = "Marco Matarazzo set description for [New Card](https://trello.com/c/P2r0z66z) to:\n~~~ quote\nNew Description\n~~~"diff --git a/zerver/webhooks/trello/view/card_actions.py b/zerver/webhooks/trello/view/card_actions.pyindex 09012b6b63e..f59b404cdbd 100644--- a/zerver/webhooks/trello/view/card_actions.py+++ b/zerver/webhooks/trello/view/card_actions.py@@ -16,7 +16,9 @@ SUPPORTED_CARD_ACTIONS = []IGNORED_CARD_ACTIONS = [- 'createCheckItem',+ "createCheckItem",+ "updateCheckItem",+ "updateList",]CREATE = 'createCard'