mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 12:21:58 +00:00
trello: Ignore updateCheckItem/updateList actions.
This commit is contained in:
@@ -112,21 +112,26 @@ class TrelloHookTests(WebhookTestCase):
|
|||||||
payload = self.get_body('change_board_background_image')
|
payload = self.get_body('change_board_background_image')
|
||||||
self.verify_post_is_ignored(payload)
|
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 the
|
Certain card-related actions are now ignored solely based on the
|
||||||
action type, and we don't need to do any other parsing to ignore
|
action type, and we don't need to do any other parsing to ignore
|
||||||
them as invalid.
|
them as invalid.
|
||||||
"""
|
"""
|
||||||
action = "createCheckItem"
|
actions = [
|
||||||
data = dict(
|
"createCheckItem",
|
||||||
model="whatever",
|
"updateCheckItem",
|
||||||
action=dict(
|
"updateList",
|
||||||
type=action,
|
]
|
||||||
),
|
for action in actions:
|
||||||
)
|
data = dict(
|
||||||
payload = orjson.dumps(data).decode()
|
model="whatever",
|
||||||
self.verify_post_is_ignored(payload)
|
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:
|
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~~~"
|
expected_message = "Marco Matarazzo set description for [New Card](https://trello.com/c/P2r0z66z) to:\n~~~ quote\nNew Description\n~~~"
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ SUPPORTED_CARD_ACTIONS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
IGNORED_CARD_ACTIONS = [
|
IGNORED_CARD_ACTIONS = [
|
||||||
'createCheckItem',
|
"createCheckItem",
|
||||||
|
"updateCheckItem",
|
||||||
|
"updateList",
|
||||||
]
|
]
|
||||||
|
|
||||||
CREATE = 'createCard'
|
CREATE = 'createCard'
|
||||||
|
|||||||
Reference in New Issue
Block a user