2013-08-06 15:32:15 -04:00
|
|
|
# Zulip, Inc's internal git plugin configuration.
|
2013-02-15 17:01:55 -05:00
|
|
|
# The plugin and example config are under api/integrations/
|
|
|
|
|
|
|
|
# Leaving all the instructions out of this file to avoid having to
|
|
|
|
# sync them as we update the comments.
|
|
|
|
|
2013-08-07 12:26:11 -04:00
|
|
|
ZULIP_USER = "commit-bot@zulip.com"
|
|
|
|
ZULIP_API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
2013-02-15 17:01:55 -05:00
|
|
|
|
|
|
|
# commit_notice_destination() lets you customize where commit notices
|
|
|
|
# are sent to.
|
|
|
|
#
|
|
|
|
# It takes the following arguments:
|
|
|
|
# * repo = the name of the git repository
|
|
|
|
# * branch = the name of the branch that was pushed to
|
|
|
|
# * commit = the commit id
|
|
|
|
#
|
|
|
|
# Returns a dictionary encoding the stream and subject to send the
|
|
|
|
# notification to (or None to send no notification, e.g. for ).
|
|
|
|
#
|
|
|
|
# The default code below will send every commit pushed to "master" to
|
|
|
|
# * stream "commits"
|
|
|
|
# * subject "deploy => master" (using a pretty unicode right arrow)
|
|
|
|
# And similarly for branch "test-post-receive" (for use when testing).
|
|
|
|
def commit_notice_destination(repo, branch, commit):
|
2013-03-18 18:15:52 -04:00
|
|
|
if branch in ["master", "prod", "test-post-receive"]:
|
2013-03-18 18:17:16 -04:00
|
|
|
return dict(stream = 'test' if 'test-' in branch else 'commits',
|
2013-02-15 17:01:55 -05:00
|
|
|
subject = u"deploy \u21D2 %s" % (branch,))
|
|
|
|
|
|
|
|
# Return None for cases where you don't want a notice sent
|
|
|
|
return None
|
|
|
|
|
2013-10-04 13:08:46 -04:00
|
|
|
ZULIP_API_PATH = "/home/humbug/zulip/api"
|
2013-08-07 12:26:11 -04:00
|
|
|
ZULIP_SITE = "https://staging.zulip.com"
|