Handle github sending empty string for the stream.

(imported from commit 2fd85db1828be44ef63920d5df347b5f85acb573)
This commit is contained in:
Steve Howell 2013-05-01 17:38:31 -04:00
parent d0b8a2fd21
commit 7dd64eb157
1 changed files with 4 additions and 1 deletions

View File

@ -1461,10 +1461,13 @@ def build_message_from_gitlog(user_profile, name, ref, commits, before, after, u
def api_github_landing(request, user_profile, event=POST,
payload=POST(converter=json_to_dict),
branches=POST(default=''),
stream=POST(default='commits')):
stream=POST(default='')):
# TODO: this should all be moved to an external bot
repository = payload['repository']
if not stream:
stream = 'commits'
# CUSTOMER18 has requested not to get pull request notifications
if event == 'pull_request' and user_profile.realm.domain not in ['customer18.invalid', 'humbughq.com']:
pull_req = payload['pull_request']