mirror of https://github.com/zulip/zulip.git
Handle github sending empty string for the stream.
(imported from commit 2fd85db1828be44ef63920d5df347b5f85acb573)
This commit is contained in:
parent
d0b8a2fd21
commit
7dd64eb157
|
@ -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,
|
def api_github_landing(request, user_profile, event=POST,
|
||||||
payload=POST(converter=json_to_dict),
|
payload=POST(converter=json_to_dict),
|
||||||
branches=POST(default=''),
|
branches=POST(default=''),
|
||||||
stream=POST(default='commits')):
|
stream=POST(default='')):
|
||||||
# TODO: this should all be moved to an external bot
|
# TODO: this should all be moved to an external bot
|
||||||
repository = payload['repository']
|
repository = payload['repository']
|
||||||
|
|
||||||
|
if not stream:
|
||||||
|
stream = 'commits'
|
||||||
|
|
||||||
# CUSTOMER18 has requested not to get pull request notifications
|
# CUSTOMER18 has requested not to get pull request notifications
|
||||||
if event == 'pull_request' and user_profile.realm.domain not in ['customer18.invalid', 'humbughq.com']:
|
if event == 'pull_request' and user_profile.realm.domain not in ['customer18.invalid', 'humbughq.com']:
|
||||||
pull_req = payload['pull_request']
|
pull_req = payload['pull_request']
|
||||||
|
|
Loading…
Reference in New Issue