mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 04:43:58 +00:00
webhooks/gitlab: Stop filtering comments when description is null.
We filter out hidden comments out of Issue descriptions but this breaks when description is null (which is unusual). So this commit just checks to see if the description is None and if so, not to filter anything out.
This commit is contained in:
@@ -124,6 +124,16 @@ class GitlabHookTests(WebhookTestCase):
|
||||
HTTP_X_GITLAB_EVENT="Issue Hook"
|
||||
)
|
||||
|
||||
def test_create_issue_with_null_description(self) -> None:
|
||||
expected_subject = u"my-awesome-project / Issue #7 Issue without description"
|
||||
expected_message = u"Eeshan Garg created [Issue #7](https://gitlab.com/eeshangarg/my-awesome-project/issues/7)"
|
||||
self.send_and_test_stream_message(
|
||||
'issue_opened_with_null_description',
|
||||
expected_subject,
|
||||
expected_message,
|
||||
HTTP_X_GITLAB_EVENT="Issue Hook"
|
||||
)
|
||||
|
||||
def test_update_issue_event_message(self) -> None:
|
||||
expected_subject = u"my-awesome-project / Issue #1 Issue title_new"
|
||||
expected_message = u"Tomasz Kolek updated [Issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1)"
|
||||
|
||||
Reference in New Issue
Block a user