webhooks: Import REQ, has_request_variables from zerver.lib.request.

We now import REQ and has_request_variables from zerver.lib.request,
which is where these methods are defined.

Fixes #7195.
This commit is contained in:
Eeshan Garg
2017-10-31 00:55:48 -02:30
committed by Tim Abbott
parent 20f3e9b779
commit aaaed74c3d
49 changed files with 122 additions and 72 deletions

View File

@@ -1,13 +1,14 @@
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
from django.utils.translation import ugettext as _
from zerver.decorator import api_key_only_webhook_view
from zerver.lib.actions import check_send_stream_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
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.webhooks.git import get_push_commits_event_message, \
get_pull_request_event_message, get_create_branch_event_message, \
SUBJECT_WITH_BRANCH_TEMPLATE, SUBJECT_WITH_PR_OR_ISSUE_INFO_TEMPLATE
from zerver.models import UserProfile
from django.http import HttpRequest, HttpResponse
from typing import Dict, Any, Iterable, Optional, Text