mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
webhooks: Add team reviewers support in github webhook.
The github webhook implementation previously ignored the "team reviewers" part of pull_request events, resulting in inaccurate output. Fixes: #14096.
This commit is contained in:
@@ -274,11 +274,17 @@ class GithubWebhookTest(WebhookTestCase):
|
||||
expected_message)
|
||||
|
||||
def test_pull_request_review_requested_multiple_reviwers_msg(self) -> None:
|
||||
expected_message = u"**eeshangarg** requested [showell](https://github.com/showell), and [timabbott](https://github.com/timabbott) for a review on [PR #1](https://github.com/eeshangarg/Scheduler/pull/1)."
|
||||
expected_message = u"**eeshangarg** requested [showell](https://github.com/showell) and [timabbott](https://github.com/timabbott) for a review on [PR #1](https://github.com/eeshangarg/Scheduler/pull/1)."
|
||||
self.send_and_test_stream_message('pull_request__review_requested_multiple_reviewers',
|
||||
'Scheduler / PR #1 This is just a test commit',
|
||||
expected_message)
|
||||
|
||||
def test_pull_request__review_requested_team_reviewer_msg(self) -> None:
|
||||
expected_message = u"**singhsourabh** requested [shreyaskargit](https://github.com/shreyaskargit), [bajaj99prashant](https://github.com/bajaj99prashant), [review-team](https://github.com/orgs/test-org965/teams/review-team), [authority](https://github.com/orgs/test-org965/teams/authority) and [management](https://github.com/orgs/test-org965/teams/management) for a review on [PR #4](https://github.com/test-org965/webhook-test/pull/4)."
|
||||
self.send_and_test_stream_message('pull_request__review_requested_team_reviewer',
|
||||
'webhook-test / PR #4 testing webhook',
|
||||
expected_message)
|
||||
|
||||
def test_pull_request_review_requested_with_custom_topic_in_url(self) -> None:
|
||||
self.url = self.build_webhook_url(topic='notifications')
|
||||
expected_topic = u"notifications"
|
||||
|
||||
Reference in New Issue
Block a user