mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	python: Sort webhooks imports with isort.
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
			
		||||
#  -*- coding: utf-8 -*-
 | 
			
		||||
from zerver.lib.test_classes import WebhookTestCase
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Bitbucket3HookTests(WebhookTestCase):
 | 
			
		||||
    STREAM_NAME = "bitbucket3"
 | 
			
		||||
    URL_TEMPLATE = "/api/v1/external/bitbucket3?stream={stream}&api_key={api_key}"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,23 +1,23 @@
 | 
			
		||||
from inspect import signature
 | 
			
		||||
from functools import partial
 | 
			
		||||
import string
 | 
			
		||||
from typing import Any, Dict, Optional, List, Callable
 | 
			
		||||
from functools import partial
 | 
			
		||||
from inspect import signature
 | 
			
		||||
from typing import Any, Callable, Dict, List, Optional
 | 
			
		||||
 | 
			
		||||
from django.http import HttpRequest, HttpResponse
 | 
			
		||||
 | 
			
		||||
from zerver.models import UserProfile
 | 
			
		||||
from zerver.decorator import api_key_only_webhook_view
 | 
			
		||||
from zerver.lib.request import REQ, has_request_variables
 | 
			
		||||
from zerver.lib.response import json_success
 | 
			
		||||
from zerver.lib.webhooks.git import TOPIC_WITH_BRANCH_TEMPLATE, \
 | 
			
		||||
    get_push_tag_event_message, get_remove_branch_event_message, \
 | 
			
		||||
    get_create_branch_event_message, get_commits_comment_action_message, \
 | 
			
		||||
    TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE, get_pull_request_event_message, \
 | 
			
		||||
    CONTENT_MESSAGE_TEMPLATE
 | 
			
		||||
from zerver.lib.webhooks.common import check_send_webhook_message, \
 | 
			
		||||
    UnexpectedWebhookEventType
 | 
			
		||||
from zerver.webhooks.bitbucket2.view import BITBUCKET_TOPIC_TEMPLATE, \
 | 
			
		||||
    BITBUCKET_FORK_BODY, BITBUCKET_REPO_UPDATED_CHANGED
 | 
			
		||||
from zerver.lib.webhooks.common import UnexpectedWebhookEventType, \
 | 
			
		||||
    check_send_webhook_message
 | 
			
		||||
from zerver.lib.webhooks.git import CONTENT_MESSAGE_TEMPLATE, \
 | 
			
		||||
    TOPIC_WITH_BRANCH_TEMPLATE, TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE, \
 | 
			
		||||
    get_commits_comment_action_message, get_create_branch_event_message, \
 | 
			
		||||
    get_pull_request_event_message, get_push_tag_event_message, \
 | 
			
		||||
    get_remove_branch_event_message
 | 
			
		||||
from zerver.models import UserProfile
 | 
			
		||||
from zerver.webhooks.bitbucket2.view import BITBUCKET_FORK_BODY, \
 | 
			
		||||
    BITBUCKET_REPO_UPDATED_CHANGED, BITBUCKET_TOPIC_TEMPLATE
 | 
			
		||||
 | 
			
		||||
BRANCH_UPDATED_MESSAGE_TEMPLATE = "{user_name} pushed to branch {branch_name}. Head is now {head}."
 | 
			
		||||
PULL_REQUEST_MARKED_AS_NEEDS_WORK_TEMPLATE = "{user_name} marked [PR #{number}]({url}) as \"needs work\"."
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user