From f6500d691eda62d0d73ef8c39d93d6b6d74b8be9 Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Tue, 24 Sep 2013 15:53:33 -0400 Subject: [PATCH] github: Make pull request comments go to the user-specified stream (imported from commit dfce76bcba43dd4a0beba6b6af7642363193dcde) --- zerver/tests.py | 6 ++++++ zerver/views/webhooks.py | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/zerver/tests.py b/zerver/tests.py index db0fc91349..f8d307d45a 100644 --- a/zerver/tests.py +++ b/zerver/tests.py @@ -3478,6 +3478,12 @@ class GithubHookTests(AuthedTestCase): "zulip-test: pull request 9: Less cowbell.", "zbenjamin [commented](https://github.com/zbenjamin/zulip-test/pull/9#issuecomment-24771110) on [pull request 9](https://github.com/zbenjamin/zulip-test/pull/9)\n\n~~~ quote\nYeah, who really needs more cowbell than we already have?\n~~~") + def test_pull_request_comment_user_specified_stream(self): + self.basic_test('pull_request_comment', 'my_commits', + "zulip-test: pull request 9: Less cowbell.", + "zbenjamin [commented](https://github.com/zbenjamin/zulip-test/pull/9#issuecomment-24771110) on [pull request 9](https://github.com/zbenjamin/zulip-test/pull/9)\n\n~~~ quote\nYeah, who really needs more cowbell than we already have?\n~~~", + send_stream=True) + class PivotalHookTests(AuthedTestCase): def send_pivotal_message(self, name): diff --git a/zerver/views/webhooks.py b/zerver/views/webhooks.py index c290402466..6b78d785bf 100644 --- a/zerver/views/webhooks.py +++ b/zerver/views/webhooks.py @@ -81,7 +81,6 @@ def api_github_landing(request, user_profile, event=REQ, noun = 'issue' else: # It's a pull request comment - stream = 'commits' noun = 'pull request' subject = github_generic_subject(noun, repository, issue)