webhooks/semaphore: Add support for Semaphore 2.0 notifications.

Semaphore has currently has two different versions of their product -
Classic and 2.0. This commit adds support for Semaphore 2.0, along side
Semaphore Classic, using the same webhook. This would let the integration
work seamlessly for users who have already configured a Zulip integration in
their Semaphore 2.0 projects.

Semaphore 2.0 currently only supports GitHub and their payloads do not
contain URLs for common entities like commits, pull requests and tags. We
construct URLs for them using templates, but also try to support other
services by providing notifications without URLs.

Closes #14171

Co-authored-by: Puneeth Chaganti <punchagan@muse-amuse.in>
This commit is contained in:
Abhinav
2020-03-14 17:42:03 +05:30
committed by Tim Abbott
parent a3164a3316
commit 41fc7b2ae1
7 changed files with 486 additions and 10 deletions

View File

@@ -327,7 +327,7 @@ WEBHOOK_INTEGRATIONS = [
WebhookIntegration('pivotal', ['project-management'], display_name='Pivotal Tracker'),
WebhookIntegration('raygun', ['monitoring'], display_name="Raygun"),
WebhookIntegration('reviewboard', ['version-control'], display_name="ReviewBoard"),
WebhookIntegration('semaphore', ['continuous-integration', 'deployment'], stream_name='builds'),
WebhookIntegration('semaphore', ['continuous-integration', 'deployment']),
WebhookIntegration('sentry', ['monitoring']),
WebhookIntegration('slack', ['communication']),
WebhookIntegration('solano', ['continuous-integration'], display_name='Solano Labs'),