mirror of
https://github.com/zulip/zulip.git
synced 2026-07-06 21:18:58 +08:00
Annotate zerver/views/webhooks/bitbucket.py.
This commit is contained in:
parent
8bbd93011d
commit
cf93c8bce0
@ -1,5 +1,10 @@
|
||||
from __future__ import absolute_import
|
||||
from zerver.models import get_client
|
||||
|
||||
from typing import Any
|
||||
|
||||
from django.http import HttpRequest
|
||||
|
||||
from zerver.models import get_client, UserProfile
|
||||
from zerver.lib.actions import check_send_message
|
||||
from zerver.lib.response import json_success
|
||||
from zerver.lib.validator import check_dict
|
||||
@ -12,6 +17,7 @@ from .github import build_commit_list_content
|
||||
@has_request_variables
|
||||
def api_bitbucket_webhook(request, user_profile, payload=REQ(validator=check_dict([])),
|
||||
stream=REQ(default='commits')):
|
||||
# type: (HttpRequest, UserProfile, Dict[str, Any], str) -> None
|
||||
repository = payload['repository']
|
||||
commits = [{'id': commit['raw_node'], 'message': commit['message'],
|
||||
'url': '%s%scommits/%s' % (payload['canon_url'],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user