mirror of https://github.com/zulip/zulip.git
Annotate circleci integration.
This commit is contained in:
parent
0ca7af6137
commit
af823f7a76
|
@ -1,8 +1,14 @@
|
|||
# Webhooks for external integrations.
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
from six import text_type
|
||||
from typing import Any
|
||||
|
||||
from zerver.lib.actions import check_send_message
|
||||
from zerver.lib.response import json_success, json_error
|
||||
from zerver.decorator import REQ, has_request_variables, api_key_only_webhook_view
|
||||
from zerver.models import UserProfile, Client
|
||||
|
||||
import ujson
|
||||
|
||||
|
@ -16,6 +22,7 @@ FAILED_STATUS = 'failed'
|
|||
@has_request_variables
|
||||
def api_circleci_webhook(request, user_profile, client, payload=REQ(argument_type='body'),
|
||||
stream=REQ(default='circleci')):
|
||||
# type: (HttpRequest, UserProfile, Client, Dict[str, Any], text_type) -> HttpResponse
|
||||
payload = payload['payload']
|
||||
subject = get_subject(payload)
|
||||
body = get_body(payload)
|
||||
|
|
Loading…
Reference in New Issue