bitbucket: Include the branch name in the topic

(imported from commit b9074dc509818b4db0c4fa10f6200935c4738b64)
This commit is contained in:
Zev Benjamin 2013-10-24 16:03:09 -04:00
parent 94c0b2fe70
commit 98ec953e2e
1 changed files with 3 additions and 2 deletions

View File

@ -538,8 +538,9 @@ def api_bitbucket_webhook(request, user_profile, payload=REQ(converter=json_to_d
% (payload['user'],
payload['canon_url'] + repository['absolute_url']))
else:
content = build_commit_list_content(commits, payload['commits'][-1]['branch'],
None, payload['user'])
branch = payload['commits'][-1]['branch']
content = build_commit_list_content(commits, branch, None, payload['user'])
subject += '/%s' % (branch,)
subject = elide_subject(subject)
check_send_message(user_profile, get_client("API"), "stream", [stream], subject, content)