mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
webhooks: Remove description from Issue Assigned event message.
This commit removes the description from the Issue Assigned event message that is sent by the Github Integration. Previously when an issue was assigned, the message also had the description of the issue, which is redundant as the description has been already sent through the issue created event. After this commit, the description no longer appears in the message. Fixes #24554
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user