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 1c320cce17
commit 2240a03c9e
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(","))