Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
webhooks: Remove description from Issue Assigned event message.
sbansal199985689a5343aa
diff --git a/zerver/webhooks/github/tests.py b/zerver/webhooks/github/tests.pyindex 5aae92775b1..b7a7aa879c0 100644--- a/zerver/webhooks/github/tests.py+++ b/zerver/webhooks/github/tests.py@@ -143,14 +143,14 @@ class GitHubWebhookTest(WebhookTestCase):self.check_webhook("issues", expected_topic, expected_message)def test_issue_assigned(self) -> None:- expected_message = "sbansal1999 assigned [issue #7](https://github.com/sbansal1999/testing-gh/issues/7) (assigned to sbansal1999):\n\n~~~ quote\nIDK how this works, lets see if it can be fixed or not.\n~~~"+ expected_message = "sbansal1999 assigned [issue #7](https://github.com/sbansal1999/testing-gh/issues/7) (assigned to sbansal1999)."expected_topic = "testing-gh / issue #7 Sample Issue testing something"self.check_webhook("issues__assigned", expected_topic, expected_message)def test_issue_assigned_with_custom_topic_in_url(self) -> None:self.url = self.build_webhook_url(topic="notifications")expected_topic = "notifications"- expected_message = "sbansal1999 assigned [issue #7 Sample Issue testing something](https://github.com/sbansal1999/testing-gh/issues/7) (assigned to sbansal1999):\n\n~~~ quote\nIDK how this works, lets see if it can be fixed or not.\n~~~"+ expected_message = "sbansal1999 assigned [issue #7 Sample Issue testing something](https://github.com/sbansal1999/testing-gh/issues/7) (assigned to sbansal1999)."self.check_webhook("issues__assigned", expected_topic, expected_message)def test_issue_unassigned(self) -> None:diff --git a/zerver/webhooks/github/view.py b/zerver/webhooks/github/view.pyindex 8b414adcac2..fc909f0ca1b 100644--- a/zerver/webhooks/github/view.py+++ b/zerver/webhooks/github/view.py@@ -165,7 +165,7 @@ def get_issue_body(helper: Helper) -> str:action=action,url=issue["html_url"].tame(check_string),number=issue["number"].tame(check_int),- message=issue["body"].tame(check_none_or(check_string)),+ message=None if action == "assigned" 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,)