From a12629243122a88bf0761e102dc5b33f82b0fa87 Mon Sep 17 00:00:00 2001 From: acrefoot Date: Tue, 28 Jan 2014 11:14:40 -0500 Subject: [PATCH] Add github issues tracking to CMU's realm (imported from commit 5f4f00888687d14ddf6977e6b2de188294e8e44f) --- zerver/views/webhooks.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zerver/views/webhooks.py b/zerver/views/webhooks.py index 20c0073b9c..a953b7decd 100644 --- a/zerver/views/webhooks.py +++ b/zerver/views/webhooks.py @@ -51,7 +51,10 @@ def api_github_v1(user_profile, event, payload, branches, stream, **kwargs): commit_stream = stream # in v1, we assume that the stream 'issues' exists, since we only handle issues for CUSTOMER5 and ourselves - issue_stream = 'issues' if user_profile.realm.domain in ('customer5.invalid', 'zulip.com') else stream + issue_stream = stream + + if user_profile.realm.domain in ('customer5.invalid', 'zulip.com'): + issue_stream = 'issues' return api_github_v2(user_profile, event, payload, branches, stream, commit_stream, issue_stream, **kwargs) @@ -175,9 +178,9 @@ def api_github_landing(request, user_profile, event=REQ, if (event == 'pull_request' and user_profile.realm.domain in ['customer18.invalid']) or exclude_pull_requests: return json_success() - # Only Zulip and CUSTOMER5 get issues right now + # Only Zulip, CUSTOMER5, and CMU get issues right now # TODO: is this still the desired behavior? - if event == 'issues' and user_profile.realm.domain not in ('zulip.com', 'customer5.invalid') or exclude_issues: + if event == 'issues' and user_profile.realm.domain not in ('zulip.com', 'customer5.invalid', 'customer27.invalid') or exclude_issues: return json_success() # CUSTOMER37 and CUSTOMER38 do not want github issues traffic, or push notifications, only pull requests.