integrations: Use new function in Github releases.

Use get_release_event_message from webhooks/git.py to format release
events using the newly implemented release message template.

Tweaked by tabbott to handle name=None.

Builds on #14746. Proposed in #14934.
This commit is contained in:
cestrell
2020-05-11 20:39:57 -04:00
committed by Tim Abbott
parent e3f0b2f20f
commit 297185cc12
2 changed files with 13 additions and 8 deletions

View File

@@ -206,7 +206,7 @@ class GithubWebhookTest(WebhookTestCase):
self.send_and_test_stream_message('team_add', self.EXPECTED_TOPIC_REPO_EVENTS, expected_message)
def test_release_msg(self) -> None:
expected_message = "baxterthehacker published [release for tag 0.0.1](https://github.com/baxterthehacker/public-repo/releases/tag/0.0.1)."
expected_message = "baxterthehacker published release [0.0.1](https://github.com/baxterthehacker/public-repo/releases/tag/0.0.1) for tag 0.0.1."
self.send_and_test_stream_message('release', self.EXPECTED_TOPIC_REPO_EVENTS, expected_message)
def test_page_build_msg(self) -> None: