From af823f7a7630dbcea23d928aefca05b4ee7ca8da Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 29 Jul 2016 15:41:28 -0700 Subject: [PATCH] Annotate circleci integration. --- zerver/views/webhooks/circleci.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zerver/views/webhooks/circleci.py b/zerver/views/webhooks/circleci.py index 451b09236c..70438838e3 100644 --- a/zerver/views/webhooks/circleci.py +++ b/zerver/views/webhooks/circleci.py @@ -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)