Add 'client' string to our missing integrations.

Not done: Jira, Nagios

(imported from commit 3e2505653b377f8c307745e507bdc40e980dca05)
This commit is contained in:
Waseem Daher 2013-12-05 17:42:33 -05:00
parent f923c15ba8
commit a4111a2426
9 changed files with 23 additions and 10 deletions

View File

@ -36,6 +36,7 @@ import urllib2
import sys
sys.path.insert(0, os.path.dirname(__file__))
import zulip_asana_config as config
VERSION = "0.9"
if config.ZULIP_API_PATH is not None:
sys.path.append(config.ZULIP_API_PATH)
@ -47,7 +48,7 @@ else:
logging.basicConfig(level=logging.INFO)
client = zulip.Client(email=config.ZULIP_USER, api_key=config.ZULIP_API_KEY,
site=config.ZULIP_SITE)
site=config.ZULIP_SITE, client="asana " + VERSION)
def fetch_from_asana(path):
"""

View File

@ -37,6 +37,7 @@ from HTMLParser import HTMLParser
sys.path.insert(0, os.path.dirname(__file__))
import zulip_basecamp_config as config
VERSION = "0.9"
if config.ZULIP_API_PATH is not None:
sys.path.append(config.ZULIP_API_PATH)
@ -46,7 +47,8 @@ import zulip
client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY)
api_key=config.ZULIP_API_KEY,
client="basecamp " + VERSION)
user_agent = "Basecamp To Zulip Mirroring script (support@zulip.com)"
htmlParser = HTMLParser()

View File

@ -41,6 +41,7 @@ import dateutil.parser
sys.path.insert(0, os.path.dirname(__file__))
import zulip_codebase_config as config
VERSION = "0.9"
if config.ZULIP_API_PATH is not None:
sys.path.append(config.ZULIP_API_PATH)
@ -49,7 +50,8 @@ import zulip
client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY)
api_key=config.ZULIP_API_KEY,
client="codebase " + VERSION)
user_agent = "Codebase To Zulip Mirroring script (support@zulip.com)"
# find some form of JSON loader/dumper, with a preference order for speed.

View File

@ -36,6 +36,7 @@ import os.path
sys.path.insert(0, os.path.dirname(__file__))
import zulip_git_config as config
VERSION = "0.9"
if config.ZULIP_API_PATH is not None:
sys.path.append(config.ZULIP_API_PATH)
@ -44,7 +45,8 @@ import zulip
client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY)
api_key=config.ZULIP_API_KEY,
client="git " + VERSION)
# check_output is backported from subprocess.py in Python 2.7
def check_output(*popenargs, **kwargs):

View File

@ -36,7 +36,7 @@ import urlparse
import feedparser
import zulip
VERSION = "0.9"
RSS_DATA_DIR = os.path.expanduser(os.path.join('~', '.cache', 'zulip-rss'))
OLDNESS_THRESHOLD = 30 # days
@ -164,7 +164,7 @@ except IOError:
log_error_and_exit("Unable to read feed file at %s." % (opts.feed_file,))
client = zulip.Client(email=opts.email, api_key=opts.api_key,
site=opts.site)
site=opts.site, client="rss " + VERSION)
first_message = True

View File

@ -36,6 +36,7 @@ import pysvn
sys.path.insert(0, os.path.dirname(__file__))
import zulip_svn_config as config
VERSION = "0.9"
if config.ZULIP_API_PATH is not None:
sys.path.append(config.ZULIP_API_PATH)
@ -44,7 +45,8 @@ import zulip
client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY)
api_key=config.ZULIP_API_KEY,
client="svn " + VERSION)
svn = pysvn.Client()
path, rev = sys.argv[1:]

View File

@ -40,6 +40,7 @@ import sys
import os.path
sys.path.insert(0, os.path.dirname(__file__))
import zulip_trac_config as config
VERSION = "0.9"
if config.ZULIP_API_PATH is not None:
sys.path.append(config.ZULIP_API_PATH)
@ -48,7 +49,8 @@ import zulip
client = zulip.Client(
email=config.ZULIP_USER,
site=config.ZULIP_SITE,
api_key=config.ZULIP_API_KEY)
api_key=config.ZULIP_API_KEY,
client="trac " + VERSION)
def markdown_ticket_url(ticket, heading="ticket"):
return "[%s #%s](%s/%s)" % (heading, ticket.id, config.TRAC_BASE_TICKET_URL, ticket.id)

View File

@ -29,7 +29,7 @@ import optparse
import ConfigParser
import zulip
VERSION = "0.9"
CONFIGFILE = os.path.expanduser("~/.zulip_twitterrc")
def write_config(config, since_id, user):
@ -129,6 +129,7 @@ client = zulip.Client(
email=options.email,
api_key=options.api_key,
site=options.site,
client="twitter " + VERSION,
verbose=True)
if since_id < 0 or options.twitter_id != user_id:

View File

@ -29,7 +29,7 @@ import optparse
import ConfigParser
import zulip
VERSION = "0.9"
CONFIGFILE = os.path.expanduser("~/.zulip_twitterrc")
def write_config(config, since_id):
@ -146,6 +146,7 @@ client = zulip.Client(
email=opts.email,
api_key=opts.api_key,
site=opts.site,
client="twitter search " + VERSION,
verbose=True)
search_query = " OR ".join(opts.search_terms.split(","))