Skip to content

Commit

Permalink
Annotate zerver/views/webhooks/bitbucket.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwbarton committed Jun 4, 2016
1 parent 8411b2e commit 41fbc16
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion zerver/views/webhooks/bitbucket.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -12,6 +17,7 @@
@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'],
Expand Down

0 comments on commit 41fbc16

Please sign in to comment.