Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
webhooks: Remove description from Issue Unassigned event message.
sbansal1999e15df084ada9
diff --git a/zerver/webhooks/github/tests.py b/zerver/webhooks/github/tests.pyindex b7a7aa879c0..ca6b9e6d63a 100644--- a/zerver/webhooks/github/tests.py+++ b/zerver/webhooks/github/tests.py@@ -154,14 +154,14 @@ class GitHubWebhookTest(WebhookTestCase):self.check_webhook("issues__assigned", expected_topic, expected_message)def test_issue_unassigned(self) -> None:- expected_message = "sbansal1999 unassigned [issue #9](https://github.com/sbansal1999/testing-gh/issues/9) (assigned to tester987654):\n\n~~~ quote\nSome Random Description about which I know nothing\n~~~"+ expected_message = "sbansal1999 unassigned [issue #9](https://github.com/sbansal1999/testing-gh/issues/9) (assigned to tester987654)."expected_topic = "testing-gh / issue #9 idk man"self.check_webhook("issues__unassigned", expected_topic, expected_message)def test_issue_unassigned_with_custom_topic_in_url(self) -> None:self.url = self.build_webhook_url(topic="notifications")expected_topic = "notifications"- expected_message = "sbansal1999 unassigned [issue #9 idk man](https://github.com/sbansal1999/testing-gh/issues/9) (assigned to tester987654):\n\n~~~ quote\nSome Random Description about which I know nothing\n~~~"+ expected_message = "sbansal1999 unassigned [issue #9 idk man](https://github.com/sbansal1999/testing-gh/issues/9) (assigned to tester987654)."self.check_webhook("issues__unassigned", expected_topic, expected_message)def test_membership_msg(self) -> None:diff --git a/zerver/webhooks/github/view.py b/zerver/webhooks/github/view.pyindex fc909f0ca1b..03601f559ee 100644--- a/zerver/webhooks/github/view.py+++ b/zerver/webhooks/github/view.py@@ -165,7 +165,9 @@ def get_issue_body(helper: Helper) -> str:action=action,url=issue["html_url"].tame(check_string),number=issue["number"].tame(check_int),- message=None if action == "assigned" else issue["body"].tame(check_none_or(check_string)),+ message=None+ if action in ("assigned", "unassigned")+ else issue["body"].tame(check_none_or(check_string)),assignee=assignee["login"].tame(check_string) if assignee else None,title=issue["title"].tame(check_string) if include_title else None,)