mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
integrations: Add Gogs webhook for release event.
Extends Gogs integrations in order to support a published release. Tested on my local Ubuntu development server running on WSL2. Fixes #14746.
This commit is contained in:
@@ -137,6 +137,11 @@ class GogsHookTests(WebhookTestCase):
|
||||
expected_message = """kostekIV edited a [comment](https://try.gogs.io/kostekIV/test/issues/3#issuecomment-3634) on [Issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nedit comment\n~~~"""
|
||||
self.send_and_test_stream_message('issue_comment__edited', expected_topic, expected_message)
|
||||
|
||||
def test_release_published(self) -> None:
|
||||
expected_topic = "zulip_test / v1.4 Title"
|
||||
expected_message = """cestrell published release [Title](https://try.gogs.io/cestrell/zulip_test) for tag v1.4."""
|
||||
self.send_and_test_stream_message('release__published', expected_topic, expected_message)
|
||||
|
||||
@patch('zerver.webhooks.gogs.view.check_send_webhook_message')
|
||||
def test_push_filtered_by_branches_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:
|
||||
self.url = self.build_webhook_url(branches='changes,development')
|
||||
|
||||
Reference in New Issue
Block a user