diff --git a/api/bots/feedback-bot b/api/bots/feedback-bot index 292bde58d6..28efff77fc 100755 --- a/api/bots/feedback-bot +++ b/api/bots/feedback-bot @@ -3,25 +3,16 @@ import sys import os import optparse -usage = """feedback-bot [options] - -Forwards messages from MIT realm users sent to feedback@humbughq.com over to Humbug realm - -Example: feedback-bot --site=http://127.0.0.1:9991 -""" -parser = optparse.OptionParser(usage=usage) -parser.add_option('--site', - dest='site', - default="https://humbughq.com", - action='store') -(options, args) = parser.parse_args() - sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) import api.common -client = api.common.HumbugAPI(email="feedback@humbughq.com", - api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - verbose=True, - site=options.site) +prod_client = api.common.HumbugAPI(email="feedback@humbughq.com", + api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + verbose=True, + site="https://humbughq.com") +staging_client = api.common.HumbugAPI(email="feedback@humbughq.com", + api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + verbose=True, + site="https://staging.humbughq.com") def forward_message(message): forwarded_message = { @@ -30,6 +21,6 @@ def forward_message(message): "subject": "feedback from %s" % message["sender_email"], "content": message["content"], } - client.send_message(forwarded_message) + staging_client.send_message(forwarded_message) -client.call_on_each_message(forward_message) +prod_client.call_on_each_message(forward_message) diff --git a/api/bots/humbug_trac.py b/api/bots/humbug_trac.py index 3a4850c081..835b2e4424 100644 --- a/api/bots/humbug_trac.py +++ b/api/bots/humbug_trac.py @@ -21,6 +21,7 @@ import sys sys.path.append("/home/humbug/humbug") import api.common client = api.common.HumbugAPI(email="humbug+trac@humbughq.com", + site="https://staging.humbughq.com", api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") def markdown_ticket_url(ticket, heading="ticket"): diff --git a/tools/review b/tools/review index 05cb2f4f3b..18052887e9 100755 --- a/tools/review +++ b/tools/review @@ -306,6 +306,7 @@ def main(args): print >>sys.stderr, "You need to place your Humbug API key at %s" % (api_key_file,) sys.exit(1) client = api.common.HumbugAPI(email=me[me.index("<") + 1:me.index('>')], + site="https://staging.humbughq.com", api_key=file(api_key_file).read().strip(), verbose=True) client.send_message({'type': "personal",