mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
git webhooks: Handle assignment events better.
With the introduction of `assignee_updated` parameter in the library, - Github, Gitea, Gogs can display the assignee in assignment events. - Github can display the user unassigned in unassignment events. Fixes https://chat.zulip.org/#narrow/channel/127-integrations/near/1965136
This commit is contained in:
@@ -53,7 +53,7 @@ class GiteaHookTests(WebhookTestCase):
|
||||
|
||||
def test_pull_request_assigned(self) -> None:
|
||||
expected_topic_name = "test / PR #1906 test 2"
|
||||
expected_message = """kostekIV assigned [PR #5](https://try.gitea.io/kostekIV/test/pulls/5) from `d` to `master` (assigned to kostekIV)."""
|
||||
expected_message = """kostekIV assigned kostekIV to [PR #5](https://try.gitea.io/kostekIV/test/pulls/5) from `d` to `master` (assigned to kostekIV)."""
|
||||
self.check_webhook("pull_request__assigned", expected_topic_name, expected_message)
|
||||
|
||||
def test_issues_opened(self) -> None:
|
||||
@@ -73,7 +73,7 @@ class GiteaHookTests(WebhookTestCase):
|
||||
|
||||
def test_issues_assigned(self) -> None:
|
||||
expected_topic_name = "test / issue #3 Test issue"
|
||||
expected_message = """kostekIV assigned [issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest body\n~~~"""
|
||||
expected_message = """kostekIV assigned kostekIV to [issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest body\n~~~"""
|
||||
self.check_webhook("issues__assigned", expected_topic_name, expected_message)
|
||||
|
||||
def test_issues_reopened(self) -> None:
|
||||
|
Reference in New Issue
Block a user