mirror of https://github.com/zulip/zulip.git
1666 lines
78 KiB
HTML
1666 lines
78 KiB
HTML
{% extends "zerver/portico.html" %}
|
|
|
|
{# API information page #}
|
|
|
|
{% block portico_content %}
|
|
|
|
<div class="portico-page-header"><a href="#"><i class="icon-vector-gears portico-page-header-icon"></i>Integrations</a></div>
|
|
|
|
<p class="portico-large-text">With Zulip integrations, your team can stay up-to-date on
|
|
code changes, issue tickets, build system results, and much more. If you don't see the system you would like to integrate with it, or run into any
|
|
trouble, don't hesitate to <a href="mailto:support@zulip.com?subject=Integration%20question">email us</a>.</p>
|
|
|
|
<p>Many of these integrations require creating a Zulip bot. You can do so on your <a href="https://zulip.com/#settings">Zulip settings page</a>. Be sure to note its username and API key.</p>
|
|
|
|
<div id="integration-instruction-block" class="integration-instruction-block">
|
|
<a href="#" id="integration-list-link"><i class="icon-vector-circle-arrow-left"></i> Back to list</a>
|
|
</div>
|
|
|
|
<div class="integration-lozenges">
|
|
<div class="integration-lozenge integration-asana">
|
|
<a class="integration-link integration-asana" href="#asana">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/asana.png" alt="Asana logo" />
|
|
<span class="integration-label">Asana</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-basecamp">
|
|
<a class="integration-link integration-basecamp" href="#basecamp">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/basecamp.png" alt="Basecamp logo" />
|
|
<span class="integration-label">Basecamp</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-beanstalk">
|
|
<a class="integration-link integration-beanstalk" href="#beanstalk">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/beanstalk.png" alt="Beanstalk logo" />
|
|
<span class="integration-label">Beanstalk</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-bitbucket">
|
|
<a class="integration-link integration-bitbucket" href="#bitbucket">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/bitbucket.png" alt="Bitbucket logo" />
|
|
<span class="integration-label">Bitbucket</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-capistrano">
|
|
<a class="integration-link integration-capistrano" href="#capistrano">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/capistrano.png" alt="Capistrano logo" />
|
|
<span class="integration-label">Capistrano</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-codebase">
|
|
<a class="integration-link integration-codebase" href="#codebase">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/codebase.png" alt="Codebase logo" />
|
|
<span class="integration-label">Codebase</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-deskcom">
|
|
<a class="integration-link integration-deskcom" href="#deskcom">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/deskcom.png" alt="Desk.com logo" />
|
|
<span class="integration-label">Desk.com</span>
|
|
</a>
|
|
</div>
|
|
{% if email_integration_enabled %}
|
|
<div class="integration-lozenge integration-email">
|
|
<a class="integration-link integration-email" href="#email">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/email.png" alt="email" />
|
|
<span class="integration-label">Email</span>
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
<div class="integration-lozenge integration-freshdesk">
|
|
<a class="integration-link integration-freshdesk" href="#freshdesk">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/freshdesk.png" alt="Freshdesk logo" />
|
|
<span class="integration-label">Freshdesk</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-git">
|
|
<a class="integration-link integration-git" href="#git">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/git.png" alt="Git logo" />
|
|
<span class="integration-label">Git</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-github">
|
|
<a class="integration-link integration-github" href="#github">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/github.png" alt="Github logo" />
|
|
<span class="integration-label">GitHub</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-hubot">
|
|
<a class="integration-link integration-hubot" href="#hubot">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/hubot.png" alt="Hubot logo" />
|
|
<span class="integration-label">Hubot</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-jenkins">
|
|
<a class="integration-link integration-jenkins" href="#jenkins">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/jenkins.png" alt="Jenkins logo" />
|
|
<span class="integration-label" style="padding-top: 0px; padding-bottom: 0px;">Jenkins</span>
|
|
<span class="integration-label-secondary">(or Hudson)</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-jira">
|
|
<a class="integration-link integration-jira" href="#jira">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/jira.png" alt="JIRA logo" />
|
|
<span class="integration-label" style="padding-top: 0px; padding-bottom: 0px;">JIRA</span>
|
|
<span class="integration-label-secondary">(hosted or v5.2+)</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-jira-plugin">
|
|
<a class="integration-link integration-jira" href="#jira-plugin">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/jira.png" alt="JIRA logo" />
|
|
<span class="integration-label" style="padding-top: 0px; padding-bottom: 0px;">JIRA</span>
|
|
<span class="integration-label-secondary">(locally installed)</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-mercurial">
|
|
<a class="integration-link integration-mercurial" href="#mercurial">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/mercurial.png" alt="Mercurial logo" />
|
|
<span class="integration-label">Mercurial (hg)</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-nagios">
|
|
<a class="integration-link integration-nagios" href="#nagios">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/nagios.png" alt="Nagios logo" />
|
|
<span class="integration-label">Nagios</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-newrelic">
|
|
<a class="integration-link integration-newrelic" href="#newrelic">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/newrelic.png" alt="New Relic logo" />
|
|
<span class="integration-label">New Relic</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-perforce">
|
|
<a class="integration-link integration-perforce" href="#perforce">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/perforce.png" alt="Perforce logo" />
|
|
<span class="integration-label">Perforce</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-phabricator">
|
|
<a class="integration-link integration-phabricator" href="#phabricator">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/phabricator.png" alt="Phabricator logo" />
|
|
<span class="integration-label">Phabricator</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-pivotal">
|
|
<a class="integration-link integration-pivotal" href="#pivotal">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/pivotal.png" alt="Pivotal logo" />
|
|
<span class="integration-label">Pivotal Tracker</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-puppet">
|
|
<a class="integration-link integration-puppet" href="#puppet">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/puppet.png" alt="Puppet logo" />
|
|
<span class="integration-label">Puppet</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-redmine">
|
|
<a class="integration-link integration-redmine" href="#redmine">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/redmine.png" alt="Redmine logo" />
|
|
<span class="integration-label">Redmine</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-stash">
|
|
<a class="integration-link integration-stash" href="#stash">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/stash.png" alt="Stash logo" />
|
|
<span class="integration-label">Stash</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-subversion">
|
|
<a class="integration-link integration-subversion" href="#subversion">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/subversion.png" alt="Subversion logo" />
|
|
<span class="integration-label">Subversion</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-trac">
|
|
<a class="integration-link integration-trac" href="#trac">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/trac.png" alt="Trac logo" />
|
|
<span class="integration-label">Trac</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-trello">
|
|
<a class="integration-link integration-trello" href="#trello">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/trello.png" alt="Trello logo" />
|
|
<span class="integration-label">trello</span>
|
|
</a>
|
|
</div>
|
|
<div class="integration-lozenge integration-twitter">
|
|
<a class="integration-link integration-twitter" href="#twitter">
|
|
<img class="integration-logo" src="/static/images/integrations/logos/twitter.png" alt="Twitter logo" />
|
|
<span class="integration-label">Twitter</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="integration-instructions-group">
|
|
|
|
<div id="asana" class="integration-instructions">
|
|
|
|
<p>Get Zulip notifications for your Asana tasks!</p>
|
|
|
|
<p>First, create the stream you'd like to use for Asana notifications, and
|
|
subscribe all interested parties to this stream. We recommend the
|
|
name <code>asana</code>.</p>
|
|
|
|
<p>Next, on your <a href="/#settings" target="_blank">Zulip settings
|
|
page</a>, create an Asana bot. Please note the bot name and API key.</p>
|
|
|
|
<p>Then:</p>
|
|
<ol>
|
|
<li>
|
|
<p>Download and install our <a href="/api">Python bindings</a> on the
|
|
server where the Asana mirroring script will live. The Asana
|
|
integration will be installed to a location
|
|
like <code>/usr/local/share/zulip/integrations/asana/</code>.</p>
|
|
</li>
|
|
<li>
|
|
<p>Visit your <a href="https://app.asana.com/-/account_api">Asana
|
|
account settings page</a> and retrieve your API key.</p>
|
|
|
|
<p>Edit <code>asana/zulip_asana_config.py</code> and
|
|
change the following lines to configure the integration:</p>
|
|
|
|
<div class="codehilite">
|
|
<pre>
|
|
<span class="n">ASANA_API_KEY</span> <span class="o">=</span> <span class="s">0123456789abcdef0123456789abcdef</span>
|
|
<span class="n">ZULIP_USER</span> <span class="o">=</span> <span class="s">"asana-bot@example.com"</span>
|
|
<span class="n">ZULIP_API_KEY</span> <span class="o">=</span> <span class="s">"0123456789abcdef0123456789abcdef"</span>
|
|
{% if api_site_required %}<span class="n">ZULIP_SITE</span> <span class="o">=</span> <span class="s">"{{ external_api_uri }}"</span>{% endif %}</pre>
|
|
</div>
|
|
|
|
<p>If you are using a stream other than <code>asana</code>,
|
|
set <code>ZULIP_STREAM_NAME</code> to the chosen stream name.</p>
|
|
</li>
|
|
<li>
|
|
<p>Test your configuration by running the mirror with <code>python
|
|
asana/zulip_asana_mirror</code>. It will print some informational
|
|
messages and process any recently created or completed tasks.</p>
|
|
</li>
|
|
<li>
|
|
<p>This mirror is intended to be a long-running processing and should be
|
|
hooked into your infrastructure for keeping services running (for
|
|
example, auto-restarting through <code>supervisord</code>).</p>
|
|
|
|
<p>Please
|
|
contact <a href="mailto:support@zulip.com?subject=Asana%20integration%20question">support@zulip.com</a>
|
|
if you'd like assistance with maintaining this integration.
|
|
</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When team members create and
|
|
complete tasks in Asana, you'll get a Zulip notification that looks like
|
|
this:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/asana/001.png" />
|
|
</div>
|
|
|
|
<div id="basecamp" class="integration-instructions">
|
|
<p>First, create the stream you'd like to use for Basecamp notifications,
|
|
and subscribe all interested parties to this stream. We recommend the
|
|
name <code>basecamp</code>.</p>
|
|
|
|
<p>Next, download and install our <a href="/api">Python
|
|
bindings and example scripts</a> on the computer you'd like to run this mirroring script from.</p>
|
|
|
|
<p>You will need your Basecamp account ID. You can find it as a sequence of numbers in the URL when you log in:</p>
|
|
<img class="screenshot" src="/static/images/integrations/basecamp/001.png" />
|
|
<p>Edit the Basecamp and Zulip credentials in <code>integrations/basecamp/zulip_basecamp_config.py</code> using
|
|
your favorite editor:</p>
|
|
|
|
|
|
<div class="codehilite">
|
|
<pre><span class="n">BASECAMP_ACCOUNT_ID</span> <span class="o">=</span> <span class="s">"1234567"</span>
|
|
<span class="n">BASECAMP_USERNAME</span> <span class="o">=</span> <span class="s">"foo@example.com"</span>
|
|
<span class="n">BASECAMP_PASSWORD</span> <span class="o">=</span> <span class="s">"p455w0rd"</span>
|
|
|
|
<span class="n">ZULIP_USER</span> <span class="o">=</span> <span class="s">"basecamp-bot@example.com"</span>
|
|
<span class="n">ZULIP_API_KEY</span> <span class="o">=</span> <span class="s">"0123456789abcdef0123456789abcdef"</span>
|
|
{% if api_site_required %}<span class="n">ZULIP_SITE</span> <span class="o">=</span> <span class="s">"{{ external_api_uri }}"</span>{% endif %}</pre>
|
|
</div>
|
|
|
|
<p>Before your first run of the script, you may optionally choose to
|
|
configure it to mirror some number of hours of Basecamp activity:</p>
|
|
|
|
<div class="codehilite">
|
|
<pre><span class="n">BASECAMP_INITIAL_HISTORY_HOURS</span> <span class="o">=</span> <span class="s">10</span></pre>
|
|
</div>
|
|
|
|
<p>Now, simply run the <code>api/integrations/basecamp/zulip_basecamp_mirror</code> script.
|
|
If needed, this script may be restarted, and it will automatically resume from when
|
|
it was last running.</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> Whenever you create a new project,
|
|
calendar event, comment, message, or more, you'll get a notification in your selected stream
|
|
with the project or calendar as the topic.</p>
|
|
<img class="screenshot" src="/static/images/integrations/basecamp/002.png" />
|
|
</div>
|
|
|
|
<div id="beanstalk" class="integration-instructions">
|
|
|
|
<p>Zulip supports both SVN and Git notifications from Beanstalk.</p>
|
|
|
|
<p>First, create the stream <code>commits</code> and subscribe all
|
|
interested parties to this stream.</p>
|
|
|
|
<p>Next, in the Beanstalk web application, go to the Setup page and choose the Integrations tab.
|
|
Choose the <code>Webhooks</code> integration from the list presented. Make sure to replace the <code>@</code> in the bot's email address with <code>%40</code>,
|
|
as Beanstalk's website will incorrectly refuse to parse a username containing a <code>@</code>.</p>
|
|
|
|
<p>In the URL field, enter <code>{{ external_uri_scheme }}bot_email:bot_api_key@{{ external_api_path }}/v1/external/beanstalk</code>:</p>
|
|
<img class="screenshot" src="/static/images/integrations/beanstalk/001.png" />
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> Whenever you do a
|
|
deployment, you'll get an automated notification that looks like
|
|
this:</p>
|
|
<img class="screenshot" src="/static/images/integrations/beanstalk/002.png" />
|
|
</div>
|
|
|
|
<div id="bitbucket" class="integration-instructions">
|
|
|
|
|
|
<p>Zulip supports both Git and Mercurial notifications from Bitbucket.</p>
|
|
|
|
<p>First, create the stream you'd like to use for Bitbucket notifications,
|
|
and subscribe all interested parties to this stream. The integration will
|
|
use the default stream <code>commits</code> if no stream is supplied in the
|
|
hook; you still need to create the stream even if you are using this
|
|
default.</p>
|
|
|
|
<p>Next, from your repository's web page, go to the Administration page and choose Hooks on the left-hand side.
|
|
Choose the <code>POST</code> hook from the list presented and click "Add hook." Make sure to replace the <code>@</code> in the bot's email address with <code>%40</code>,
|
|
as Bitbucket will not execute the hook if the username contains a <code>@</code>.</p>
|
|
|
|
<p>In the URL field, enter <code>{{ external_uri_scheme }}bot_email:bot_api_key@{{ external_api_path }}/v1/external/bitbucket</code>:</p>
|
|
<img class="screenshot" src="/static/images/integrations/bitbucket/001.png" />
|
|
|
|
<p>By default, notifications are sent to the <code>commits</code> stream.
|
|
To send notifications to a different stream,
|
|
append <code style="white-space: nowrap;">?stream=stream_name</code> to
|
|
the URL.</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> Whenever you push code to your repository,
|
|
you'll get an automated notification that looks like this:</p>
|
|
<img class="screenshot" src="/static/images/integrations/bitbucket/002.png" />
|
|
</div>
|
|
|
|
<div id="capistrano" class="integration-instructions">
|
|
|
|
<p>First, download and install our <a href="/api">Python
|
|
bindings and example scripts</a> on your Capistrano server.
|
|
Once you've done that, you'll use the <code>zulip-send</code>
|
|
utility to notify you when certain events happen.</p>
|
|
|
|
<p>Here's some example code for sending a Zulip notification
|
|
after a deployment has completed:</p>
|
|
<div class="codehilite"><pre><span class="n">after</span> <span class="s1">'deploy'</span><span class="p">,</span> <span class="s1">'notify:humbug'</span>
|
|
|
|
<span class="n">namespace</span> <span class="ss">:notify</span> <span class="k">do</span>
|
|
<span class="n">desc</span> <span class="s2">"Post a message to Zulip that we've deployed"</span>
|
|
<span class="n">task</span> <span class="ss">:humbug</span> <span class="k">do</span>
|
|
<span class="c1"># this will post to Zulip as the user defined in
|
|
# ~/.zuliprc if you omit --user and --api-key</span>
|
|
<span class="n">run_locally</span> <span class="s2">"echo ':beers: I just deployed to </span><span class="si">#{</span><span class="n">stage</span><span class="si">}</span><span class="s2">! :beers:' | zulip-send \
|
|
--user capistrano-bot@example.com --api-key a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 \
|
|
{% if api_site_required %} --site={{ external_api_uri }} \
|
|
{% endif %} --stream commits --subject deployments || true"</span>
|
|
<span class="k">end</span>
|
|
<span class="k">end</span>
|
|
</pre></div>
|
|
|
|
<p>Some notes:</p>
|
|
<ul>
|
|
<li>If you prefer not to use <code>--user</code> and <code>--api-key</code> above, you can fill out <code>~/.zuliprc</code> on your Capistrano
|
|
machine. For instructions on how to write that file, see <a href="/api">the API page</a>.</li>
|
|
<li>You may need to change the <code>deploy</code> above to
|
|
another step of your deployment process, if you'd like the
|
|
notification to fire at a different time.</li>
|
|
</ul>
|
|
<em></em>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> Whenever you do a
|
|
deployment, you'll get an automated notification that looks like
|
|
this:</p>
|
|
<img class="screenshot" src="/static/images/integrations/capistrano/001.png" />
|
|
|
|
<p><small>Thanks to Wes of TurboVote for <a href="https://gist.github.com/cap10morgan/5100822">submitting this integration</a>!</small></p>
|
|
</div>
|
|
|
|
<div id="codebase" class="integration-instructions">
|
|
|
|
<p>First, create the streams you'd like to use for Codebase notifications. There will be two types of
|
|
messages: commit-related updates and issue-related updates. After creating these streams (we suggest naming
|
|
them <code>codebase commits</code> and <code>codebase issues</code>), make sure to subscribe all interested parties.</p>
|
|
|
|
<p>Next, download and install our <a href="/api">Python
|
|
bindings and example scripts</a> on the computer you'd like to run this mirroring script from.</p>
|
|
|
|
<p>You will need your Codebase API Username. You can find it in the settings page of your account, under
|
|
<code>API Credentials</code>.</p>
|
|
<p>Edit the Codebase and Zulip credentials in <code>integrations/codebase/zulip_codebase_config.py</code> using
|
|
your favorite editor:</p>
|
|
|
|
|
|
<div class="codehilite">
|
|
<pre><span class="n">CODEBASE_API_USERNAME</span> <span class="o">=</span> <span class="s">"zulip-inc/leo-franchi-15"</span>
|
|
<span class="n">CODEBASE_API_KEY</span> <span class="o">=</span> <span class="s">0123456789abcdef0123456789abcdef</span>
|
|
|
|
<span class="n">ZULIP_USER</span> <span class="o">=</span> <span class="s">"codebase-bot@example.com"</span>
|
|
<span class="n">ZULIP_API_KEY</span> <span class="o">=</span> <span class="s">"0123456789abcdef0123456789abcdef"</span>
|
|
{% if api_site_required %}<span class="n">ZULIP_SITE</span> <span class="o">=</span> <span class="s">"{{ external_api_uri }}"</span>{% endif %}</pre>
|
|
</div>
|
|
|
|
<p>Before your first run of the script, you may optionally choose to
|
|
configure it to mirror some number of hours of prior Codebase activity:</p>
|
|
|
|
<div class="codehilite">
|
|
<pre><span class="n">CODEBASE_INITIAL_HISTORY_HOURS</span> <span class="o">=</span> <span class="s">10</span></pre>
|
|
</div>
|
|
|
|
<p>Now, simply run the <code>api/integrations/codebase/zulip_codebase_mirror</code> script.
|
|
If needed, this script may be restarted, and it will automatically resume from when
|
|
it was last running.</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> Whenever you create a new project,
|
|
commit, issue, deployment, or more, you'll get notifications in your selected streams
|
|
with the associated information.</p>
|
|
<img class="screenshot" src="/static/images/integrations/codebase/001.png" />
|
|
</div>
|
|
|
|
<div id="deskcom" class="integration-instructions">
|
|
|
|
|
|
<p>First, create the stream you'd like to use for Desk.com notifications,
|
|
and subscribe all interested parties to this stream. We recommend the
|
|
stream name <code>desk</code>. Keep in mind you still need to
|
|
create the stream first even if you are using this recommendation.</p>
|
|
|
|
<p>Next, in Desk.com, open your Admin view via the top-left corner
|
|
dropdown. In the Admin view, click on Apps, then click Install under
|
|
"Custom Action":</p>
|
|
<img src="/static/images/integrations/desk/001.png" />
|
|
|
|
<p>From there, click "Install Custom Action" and accept the terms. Fill
|
|
in the form like this:</p>
|
|
<ul>
|
|
<li><b>Name</b>: Zulip</li>
|
|
<li><b>Authentication Method</b>: Basic Auth</li>
|
|
<li><b>URL</b>: <code>{{ external_api_uri }}/v1/external/desk</code></li>
|
|
<li><b>User name</b>: <em>your bot's user name, e.g.</em> <code>desk-bot@yourdomain.com</code></li>
|
|
<li><b>Password</b>: <em>your bot's API key</em></li>
|
|
</ul>
|
|
|
|
<img src="/static/images/integrations/desk/002.png" />
|
|
|
|
<p>From here, add a new action. You'll do this for every action you
|
|
want a notification on Zulip for:</p>
|
|
<img src="/static/images/integrations/desk/003.png" />
|
|
|
|
<p>Let's say you want a notification each time a case is updated. Put
|
|
in a descriptive name like "Announce case update", and copy-paste
|
|
this to the "Appended URL path":</p>
|
|
{% verbatim %}
|
|
<p><code>?stream=desk&topic={{case.id}}:+{{case.subject}}</code></p>
|
|
{% endverbatim %}
|
|
<p>The "appended URL path" will be the same for every notification —
|
|
it makes sure the notification goes to the appropriate stream and topic
|
|
within Zulip. Next, copy this template Zulip message into "Message to
|
|
POST":</p>
|
|
{% verbatim %}
|
|
<pre><code
|
|
>Case [{{case.id}}, {{case.subject}}]({{case.direct_url}}), was updated.
|
|
|
|
* Status: {{case.status.name}}
|
|
* Priority: {{case.priority}}
|
|
* Customer: {{customer.name}}
|
|
* Company: {{customer.company}}
|
|
* Description: {{case.description}}</code></pre>
|
|
<p>You don't need to edit that. All the funny-looking stuff inside
|
|
<code>{{</code> and <code>}}</code>
|
|
will be filled in by Desk.com for each event. The dialog should look
|
|
like this:</p>
|
|
{% endverbatim %}
|
|
<img src="/static/images/integrations/desk/004.png" />
|
|
|
|
<p>Save it, and then click "On" next to the action to enable it. This
|
|
is important — actions are turned off by default!</p>
|
|
|
|
<p>Now you need to create a rule that triggers this action. Desk.com's
|
|
support center has a
|
|
<a href="https://support.desk.com/customer/portal/articles/1376">lengthy
|
|
article on rules</a>, but in short, click on "Cases" up at the top,
|
|
"Rules" on the left side, and then the specific event you want to notify
|
|
on — in our example, "Case Updated". Add a rule with a name like "Notify
|
|
Zulip of case update". Click on "Add Action", select "Trigger an App
|
|
Action", and select "Zulip: Announce case update". Set "Enabled" to
|
|
"Yes". The rule should look like this:</p>
|
|
<img src="/static/images/integrations/desk/005.png" />
|
|
|
|
<p>Finally, click Update.</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When a case is updated,
|
|
you'll see a notification like the following, to the stream
|
|
<code>desk</code>, with a topic that matches the case's subject name:</p>
|
|
<img class="screenshot" src="/static/images/integrations/desk/006.png" />
|
|
</div>
|
|
|
|
|
|
{% if email_integration_enabled %}
|
|
<div id="email" class="integration-instructions">
|
|
|
|
|
|
<p>You can send emails to Zulip! This is useful:</p>
|
|
|
|
<ul>
|
|
<li>If you use a service that can send emails but does not easily lend
|
|
itself to more direct integration</li>
|
|
<li>If you have an email that you want to discuss on Zulip</li>
|
|
<li>As a structured, searchable, commentable archive for mailing list
|
|
traffic</li>
|
|
</ul>
|
|
|
|
<p>To send an email to a Zulip stream:</p>
|
|
|
|
<ol>
|
|
<li>visit your <a target="_blank" href="../#subscriptions">subscriptions
|
|
page</a> and click on the stream row to expand it.</li>
|
|
<li>Copy the stream email address
|
|
(e.g. <code>{{ email_gateway_example }}</code>). If the stream
|
|
name contains special characters, we've transformed the name so it is a
|
|
safe email recipient.</li>
|
|
<li>Send an email (To, CC, and BCC all work) to the stream email
|
|
address. The email subject will become the stream topic, and the email
|
|
body will become the Zulip message content.</li>
|
|
</ol>
|
|
|
|
<p>Please note that it may take up to one minute for the message to show up
|
|
in Zulip.</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
<div id="freshdesk" class="integration-instructions">
|
|
<h4>Freshdesk</h4>
|
|
|
|
<p>See customer support interactions right in Zulip, with our Freshdesk
|
|
integration! Note that this integration must be set up by an administrator
|
|
for your Freshdesk instance.</p>
|
|
|
|
<p>First, create the stream you'd like to use for Freshdesk notifications,
|
|
and subscribe all interested parties to this stream. We recommend the
|
|
stream name <code>freshdesk</code>.</p>
|
|
|
|
<p>Next, on your <a href="/#settings" target="_blank">Zulip settings
|
|
page</a>, create a Freshdesk bot.</p>
|
|
|
|
<p>Now we can set up the Freshdesk events that will trigger
|
|
Zulips. Freshdesk provides separate triggering mechanisms for ticket
|
|
creation and ticket changes, so we'll set up these triggers in two
|
|
parts.</p>
|
|
|
|
<h4>Part 1: Zulip notifications for new Freshdesk tickets</h4>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Visit your Freshdesk admin page. Under the <b>"Helpdesk
|
|
Productivity"</b> section, click the <b>"Dispatch'r"</b> icon:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/freshdesk/001.png" />
|
|
|
|
<p>Click the <b>"New rule"</b> button to create a new Dispatch'r rule
|
|
that will send notifications to Zulip when Freshdesk tickets are
|
|
opened.</p>
|
|
</li>
|
|
<li>
|
|
<p>On the Dispatch'r rule creation page, give the rule a name and
|
|
description. Next, we need to specify the conditions under which to
|
|
trigger Zulip notifications. There isn't a shortcut for "always
|
|
generate a notification on ticket creation", so we'll instead fake it
|
|
by picking two complementary conditions: when the source <b>is
|
|
email</b>, and when the source <b>is not email</b>:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/freshdesk/002.png" />
|
|
</li>
|
|
<li>
|
|
|
|
<p>In the <b>"Action"</b> section, add a new action of
|
|
type <b>"Trigger Webhook"</b>. Set the <b>"Request Type"</b>
|
|
to <b>"POST"</b>. Set the following <b>"Callback URL"</b>, replacing
|
|
the Zulip stream with your desired stream:</p>
|
|
|
|
<p><code>{{ external_api_uri }}/v1/external/freshdesk?stream=<font color="#00A26F">freshdesk</font></code></p>
|
|
|
|
<p>Check the <b>"Requires Authentication"</b> box, and supply the bot
|
|
e-mail address and API key.</p>
|
|
|
|
<p>The Action section should look like this so far:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/freshdesk/003.png" />
|
|
</li>
|
|
<li>
|
|
<p>Select <b>"JSON"</b> for the <b>"Encoding"</b>. Under the encoding, select
|
|
<b>"Advanced"</b>. Paste the following JSON into the <b>"Content"</b>
|
|
box:</p>
|
|
|
|
<pre>{"freshdesk_webhook":
|
|
{
|
|
"triggered_event":"{{triggered_event}}",
|
|
"ticket_id":"{{ticket.id}}",
|
|
"ticket_url":"{{ticket.url}}",
|
|
"ticket_type":"{{ticket.ticket_type}}",
|
|
"ticket_subject":"{{ticket.subject}}",
|
|
"ticket_description":"{{ticket.description}}",
|
|
"ticket_status":"{{ticket.status}}",
|
|
"ticket_priority":"{{ticket.priority}}",
|
|
"requester_name":"{{ticket.requester.name}}",
|
|
"requester_email":"{{ticket.requester.email}}",
|
|
}
|
|
}</pre>
|
|
|
|
<p>These ticket details are what will be forwarded to Zulip. The
|
|
pasted JSON should look like this:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/freshdesk/004.png" />
|
|
</li>
|
|
<li>
|
|
<p>Save your new Dispatch'r rule. The next time a Freshdesk ticket is
|
|
opened, the team will get a notification in Zulip!</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>If you only want to receive Zulip notifications on ticket creation,
|
|
stop here, you're done! If you also want notifications on important ticket
|
|
changes, please continue to the next section.</p>
|
|
|
|
<h4>Part 2: Zulip notifications on ticket changes</h4>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Visit your Freshdesk admin page. Under the <b>"Helpdesk
|
|
Productivity"</b> section, click the <b>"Observer"</b> icon:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/freshdesk/005.png" />
|
|
|
|
<p>Click the <b>"New rule"</b> button to create a new Observer rule
|
|
that will send notifications to Zulip when Freshdesk tickets are
|
|
updated.</p>
|
|
</li>
|
|
<li>
|
|
<p>On the Observer rule creation page, give the rule a name and
|
|
description. Under <b>"When Any Of These Events Occur"</b>, create
|
|
these new rules:</p>
|
|
<ul>
|
|
<li><p>Priority is changed, from Any Priority, to Any Priority</p></li>
|
|
<li><p>Status is changed, from Any Status, to Any Status</p></li>
|
|
<li><p>Note is added, Type Any</p></li>
|
|
</ul>
|
|
|
|
<p>If you do not want to receive Zulip notifications on one or more of
|
|
these events, leave out the rule for that event.</p>
|
|
|
|
<p>Under <b>"And The Events Are Performed By"</b>,
|
|
select <b>"Anyone"</b>.</p>
|
|
|
|
<p>So far, the rule should look like this:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/freshdesk/006.png" />
|
|
</li>
|
|
<li>
|
|
<p>Next, we need to specify the types of tickets that will trigger
|
|
Zulip notifications. There isn't a shortcut for "always generate a
|
|
notification on ticket update", so as before we'll instead fake it by
|
|
picking two complementary conditions: when the source <b>is email</b>,
|
|
and when the source <b>is not email</b>:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/freshdesk/007.png" />
|
|
</li>
|
|
<li>
|
|
<p>Under <b>"Perform These Actions"</b>, add a new action of
|
|
type <b>"Trigger Webhook"</b>. Set the <b>"Request Type"</b>
|
|
to <b>"POST"</b>. Set the following <b>"Callback URL"</b>, replacing
|
|
the Zulip stream with your desired stream:</p>
|
|
|
|
<p><code>{{ external_api_uri }}/v1/external/freshdesk?stream=<font color="#00A26F">freshdesk</font></code></p>
|
|
|
|
<p>Check the <b>"Requires Authentication"</b> box, and supply the bot
|
|
e-mail address and API key.</p>
|
|
|
|
<p>The Action section should look like this so far:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/freshdesk/008.png" />
|
|
</li>
|
|
<li>
|
|
<p>Select <b>"JSON"</b> for the <b>"Encoding"</b>. Under the encoding,
|
|
select <b>"Advanced"</b>. Paste the following JSON into
|
|
the <b>"Content"</b> box:</p>
|
|
|
|
<pre>{"freshdesk_webhook":
|
|
{
|
|
"triggered_event":"{{triggered_event}}",
|
|
"ticket_id":"{{ticket.id}}",
|
|
"ticket_url":"{{ticket.url}}",
|
|
"ticket_type":"{{ticket.ticket_type}}",
|
|
"ticket_subject":"{{ticket.subject}}",
|
|
"ticket_description":"{{ticket.description}}",
|
|
"ticket_status":"{{ticket.status}}",
|
|
"ticket_priority":"{{ticket.priority}}",
|
|
"requester_name":"{{ticket.requester.name}}",
|
|
"requester_email":"{{ticket.requester.email}}",
|
|
}
|
|
}</pre>
|
|
<p>These ticket details are what will be forwarded to Zulip. The
|
|
pasted JSON should look like this:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/freshdesk/009.png" />
|
|
</li>
|
|
<li>
|
|
<p>Save your new Observer rule. The next time a Freshdesk ticket is
|
|
updated, the team will get a notification in Zulip!</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> You'll now see support
|
|
progress in real time in Zulip:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/freshdesk/010.png" />
|
|
</div>
|
|
|
|
|
|
<div id="git" class="integration-instructions">
|
|
|
|
<p>First, download and install our <a href="/api">Python
|
|
bindings and example scripts</a> on your Git server.</p>
|
|
|
|
<p>Next, create the stream you'd like to use for Git notifications, and
|
|
subscribe all interested parties to this stream. The integration will use
|
|
the default stream <code>commits</code> if no stream is supplied in the
|
|
hook; you still need to create the stream even if you are using this
|
|
default.</p>
|
|
|
|
<p>Next, open <code>integrations/git/zulip_git_config.py</code>
|
|
in your favorite editor, and change the following lines to
|
|
specify the email address and API key for your Git bot:</p>
|
|
|
|
|
|
<div class="codehilite"><pre><span class="n">ZULIP_USER</span> <span class="o">=</span> <span class="s">"git-bot@example.com"</span>
|
|
<span class="n">ZULIP_API_KEY</span> <span class="o">=</span> <span class="s">"0123456789abcdef0123456789abcdef"</span>
|
|
{% if api_site_required %}<span class="n">ZULIP_SITE</span> <span class="o">=</span> <span class="s">"{{ external_api_uri }}"</span>{% endif %}</pre></div>
|
|
|
|
<p>You can also specify which pushes will result in
|
|
notifications and to what stream the notifications will be sent
|
|
by modifying the <code>commit_notice_destination</code> function
|
|
in <code>zulip_git_config.py</code>. By default, pushes to
|
|
the <code>master</code> and <code>test-post-receive</code>
|
|
branches will result in a notification to
|
|
stream <code>commits</code>.</p>
|
|
|
|
<p>Save <code>integrations/git/zulip_git_config.py</code> to
|
|
the <code>.git/hooks</code> directory of your git
|
|
repository.</p>
|
|
|
|
<p>Symlink
|
|
<code>/usr/local/share/zulip/integrations/git/post-receive</code>
|
|
into the <code>.git/hooks</code> directory of your git repository.</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> Whenever you make
|
|
a push to the <code>master</code> branch of your git repository
|
|
(or whatever you configured above), the Zulip git plugin will
|
|
send an automated notification that looks like this:</p>
|
|
<img class="screenshot" src="/static/images/integrations/git/001.png" />
|
|
|
|
<p><b>Testing</b><br />You can test the plugin without changing
|
|
your <code>master</code> branch by pushing to
|
|
the <code>test-post-receive</code> branch.</p>
|
|
</div>
|
|
|
|
<div id="github" class="integration-instructions">
|
|
|
|
<p>First, create the stream you'd like to use for GitHub notifications,
|
|
and subscribe all interested parties to this stream. The integration will
|
|
use the default stream <code>commits</code> if no stream is supplied in
|
|
the hook; you still need to create the stream even if you are using this
|
|
default.</p>
|
|
|
|
<p>Next, go to your repository page and click <b>"Settings"</b>:</p>
|
|
<img src="/static/images/integrations/github/001.png" />
|
|
|
|
<p>From there, select <b>"Service Hooks"</b>:</p>
|
|
<img src="/static/images/integrations/github/002.png" />
|
|
|
|
<p>Select <b>"Humbug"</b> from the list of service hooks. Fill in the API
|
|
key and email address for your bot and check the <b>"active"</b>
|
|
checkbox. You can optionally supply the Zulip stream (the default
|
|
is <code>commits</code>) and restrict Zulip notifications to a specified
|
|
set of branches.</p>
|
|
|
|
<p>Click the <b>"Update settings"</b> button to complete the
|
|
configuration:</p> <img src="/static/images/integrations/github/003.png"
|
|
/>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When team members push to
|
|
your repository, you'll get a Zulip notification that looks like this:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/github/004.png" />
|
|
|
|
</div>
|
|
|
|
<div id="hubot" class="integration-instructions">
|
|
|
|
|
|
<ol>
|
|
<li><p>Follow the "Getting Started with Hubot" section of the <a href="https://github.com/github/hubot/blob/master/docs/README.md">Hubot README</a> to create your Hubot. You'll have a new directory from which <code>bin/hubot</code> starts a vanilla Hubot instance with the shell backend.</p></li>
|
|
|
|
<li>In your Hubot's directory, install the Zulip adapter. Run:
|
|
<pre><code>npm install --save hubot-zulip</code></pre>
|
|
</li>
|
|
|
|
<li><p>On your <a href="https://zulip.com/#settings">Zulip settings page</a>, create a bot account. Note its username, API key and full name; you will use them on the next step.</p></li>
|
|
|
|
<li>To run Hubot locally, use:
|
|
<pre><code>HUBOT_ZULIP_BOT=hubot-bot@example.com HUBOT_ZULIP_API_KEY=your_key bin/hubot --adapter zulip --name "myhubot"</code></pre>
|
|
|
|
</li>
|
|
</ol>
|
|
|
|
<p>The bot account email address and API key are passed to Hubot via environment variables <code>HUBOT_ZULIP_BOT</code> and <code>HUBOT_ZULIP_API_KEY</code>. The <code>--name</code> parameter must match the name you gave the bot on the settings page.</p>
|
|
|
|
<p>
|
|
Hubot will automatically listen for commands on all public streams. You can also invite Hubot to invite-only streams.
|
|
</p>
|
|
|
|
<p>
|
|
To test your Hubot installation, send it an @-notification with a basic command, for example <code>@Hubot pug me</code>, which should produce a result like this:
|
|
</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/hubot/001.png" />
|
|
|
|
<p><a href='https://github.com/zulip/hubot-zulip'>Source code for the hubot-zulip adapter is available on GitHub</a>.</p>
|
|
</div>
|
|
|
|
<div id="jenkins" class="integration-instructions">
|
|
|
|
|
|
<p>First, create the stream you'd like to use for Jenkins or Hudson
|
|
notifications, and subscribe all interested parties to this stream. We
|
|
recommend the name <code>jenkins</code> or <code>hudson</code>.</p>
|
|
|
|
<p><strong>Install the plugin</strong><br />
|
|
Install the "Humbug" plugin by going to <code>Manage Jenkins
|
|
> Manage Plugins > Available</code>, typing in "Humbug", and
|
|
clicking "Install without restart".</p>
|
|
|
|
<img src="/static/images/integrations/jenkins/001.png" />
|
|
|
|
<p><strong>Configure the plugin</strong><br /> Once the plugin
|
|
is installed, configure it by going to <code>Manage Jenkins >
|
|
Configure System</code>. Scroll to the section labeled "Humbug
|
|
Notification Settings", and specify your bot's email address,
|
|
API key, the stream receiving the notifications, and whether you'd
|
|
like a notification on every build, or only when the build fails
|
|
(Smart Notification).</p>
|
|
|
|
<img src="/static/images/integrations/jenkins/002.png" />
|
|
|
|
<p><strong>Configure a post-build action for your project</strong><br />
|
|
Once you've done that, it's time to configure one of your
|
|
projects to use the Zulip notification plugin. From your
|
|
project page, click "Configure" on the left sidebar. Scroll to
|
|
the bottom until you find the section labeled "Post-build
|
|
Actions". Click the dropdown and select "Humbug
|
|
Notification". It should look as below. Then click "Save".</p>
|
|
|
|
<img src="/static/images/integrations/jenkins/003.png" />
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When your builds
|
|
fail or succeed, you'll see a commit message like the following
|
|
with a topic that matches the project name (in this case
|
|
"Humbug Test"):</p>
|
|
<img class="screenshot" src="/static/images/integrations/jenkins/004.png" />
|
|
<img class="screenshot" src="/static/images/integrations/jenkins/005.png" />
|
|
|
|
<p><b>Troubleshooting</b><br />
|
|
<ul>
|
|
<li>Did you set up a post-build action for your project?</li>
|
|
<li>Does the stream you picked (e.g. <code>jenkins</code>) already exist? If not, add yourself to it and try again.</li>
|
|
<li>Are your access key and email address correct? Test them using <a href="/api">our curl API</a>.</li>
|
|
<li>Still stuck? Email <a href="mailto:support@zulip.com?subject=Jenkins">support@zulip.com</a>.</li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
<div id="jira" class="integration-instructions">
|
|
|
|
|
|
<p><em>If you are running JIRA version 5.2 or greater, or if you are
|
|
using the hosted JIRA provided by Atlassian, you can use the built-in
|
|
web-hook support to connect to Zulip — read on. For older,
|
|
self-hosted JIRA installs, you can use our <a
|
|
href="#jira-plugin">JIRA Plugin</a>.</em></p>
|
|
|
|
<p>First, create the stream you'd like to use for JIRA notifications, and
|
|
subscribe all interested parties to this stream. We recommend the
|
|
name <code>jira</code>.</p>
|
|
|
|
<p>In your JIRA administration control panel, go to the Webhooks page. If you are using the OnDemand
|
|
hosted JIRA, follow the instructions <a href="https://developer.atlassian.com/display/JIRADEV/JIRA+Webhooks+Overview#JIRAWebhooksOverview-WhereistheJIRAAdministrationUIforwebhooks?">
|
|
on the Atlassian wiki</a> for locating the Webhook UI.
|
|
</p>
|
|
<p>Give your new web hook a name, and for the URL provide the following:</p>
|
|
<p>
|
|
<code>{{ external_api_uri }}/v1/external/jira?api_key=abcdefgh&stream=jira</code>
|
|
</p>
|
|
|
|
<p>where <code>api_key</code> is the API key of your Zulip bot,
|
|
and <code>stream</code> is the stream name you want the
|
|
notifications sent to.</p>
|
|
|
|
<p>Next, go back to Zulip and set up a stream called "jira," if it does not already exist.
|
|
(If you prefer your JIRA notifications to go to a stream other than "jira," then change the URL above to match it.)</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br />
|
|
Updates from JIRA will be sent to the Zulip stream you specified in the JIRA web-hook.
|
|
</p>
|
|
<img class="screenshot" src="/static/images/integrations/jira/001.png" />
|
|
</div>
|
|
|
|
<div id="jira-plugin" class="integration-instructions">
|
|
|
|
|
|
<p><em>If you are running JIRA version 5.2 or greater, or using the
|
|
hosted JIRA provided by Atlassian, we recommend using the <a
|
|
href="#jira">web-hook method</a> above instead. This plugin
|
|
supports older versions of JIRA.</em></p>
|
|
|
|
<p>First, create the stream you'd like to use for JIRA notifications, and
|
|
subscribe all interested parties to this stream. We recommend the
|
|
name <code>jira</code>.</p>
|
|
|
|
<h5>Plugin mechanism</h5>
|
|
Next, download and install our <a href="/api">Python bindings and example scripts</a>.
|
|
<p><b>Plugin Installation</b></p>
|
|
The JIRA integration plugin requires two JIRA plugins. Please install
|
|
the following plugins using the Universal Plugin Manager in your JIRA
|
|
installation:
|
|
<ul>
|
|
<li><a href="https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner">Script Runner Plugin</a></li>
|
|
<li><a href="https://marketplace.atlassian.com/plugins/com.atlassian.jira.plugin.jirasslplugin">SSL Plugin</a></li>
|
|
</ul>
|
|
<p><b>SSL Setup</b></p>
|
|
As Zulip is using a StartCOM SSL certificate that is not recognized by default in the Java installation shipped with JIRA,
|
|
you will need to tell JIRA about the certificate. Navigate to <code>Administration > System > Configure SSL</code> and in
|
|
the <code>Import SSL Certificates</code> field, enter <code>{{ external_api_uri }}</code>. After clicking <code>Save Certificates</code>,
|
|
follow the on-screen instructions and restart JIRA for it to recognize the proper certificates.
|
|
<p><b>Zulip Integration</b></p>
|
|
Copy the folder <code>integrations/jira/org/</code> (from the tarball you downloaded above) to your JIRA <code>classes</code> folder.
|
|
For self-contained JIRA installations, this will be <code>atlassian-jira/WEB-INF/classes/</code>, but this may be different in your deployment.
|
|
Edit the constants at the top of <code>org/zulip/jira/ZulipListener.groovy</code>
|
|
and fill them with the appropriate values:
|
|
<div class="codehilite"><pre><span class="n">String</span> <span class="n">zulipEmail</span> <span class="o">=</span> <span class="s2">"jira-notifications-bot@example.com"</span>
|
|
<span class="n">String</span> <span class="n">zulipAPIKey</span> <span class="o">=</span> <span class="s2">"0123456789abcdef0123456789abcdef"</span>
|
|
<span class="n">String</span> <span class="n">zulipStream</span> <span class="o">=</span> <span class="s2">"JIRA"</span>
|
|
<span class="n">String</span> <span class="n">issueBaseUrl</span> <span class="o">=</span> <span class="s2">"https://jira.COMPANY.com/browse/"</span>
|
|
</pre></div>
|
|
<p>In the Administrators page, navigate to <code>Plugins > Other > Script Listeners</code>. In the <code>Add Listener</code> section, click on
|
|
the <code>Custom Listener</code> option. Select the events you wish the Zulip integration to fire for, and the projects you wish Zulip to be notified for.
|
|
In the <code>Name of groovy class</code> field, enter <code>org.zulip.jira.ZulipListener</code>.
|
|
</p>
|
|
|
|
<p>Click <code>Add Listener</code>, and JIRA will now notify your Zulip of changes to your issues!</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br />
|
|
Updates from JIRA will be sent to the stream you've configured, as below.</p>
|
|
<img class="screenshot" src="/static/images/integrations/jira/001.png" />
|
|
</div>
|
|
|
|
<div id="nagios" class="integration-instructions">
|
|
|
|
|
|
<p>First, create the stream you'd like to use for Nagios notifications,
|
|
and subscribe all interested parties to this stream. The integration will
|
|
use the default stream <code>nagios</code> if no stream is supplied in the
|
|
configuration; you still need to create the stream even if you are using
|
|
this default.</p>
|
|
|
|
<p>Next, download and install our <a href="/api">Python
|
|
bindings and example scripts</a> on your Nagios server.</p>
|
|
|
|
<p>Next, open <code>integrations/nagios/zuliprc.example</code>
|
|
in your favorite editor, and change the following lines to
|
|
specify the email address and API key for your Nagios bot,
|
|
saving it to <code>/etc/nagios3/zuliprc</code> on your Nagios
|
|
server:</p>
|
|
|
|
<div class="codehilite"><pre>[api]
|
|
email = NAGIOS_BOT_EMAIL_ADDRESS
|
|
key = NAGIOS_BOT_API_KEY
|
|
{% if api_site_required %}site = {{ external_api_uri }}{% endif %}</pre></div>
|
|
|
|
<p>Copy <code>integrations/nagios/zulip_nagios.cfg</code>
|
|
to <code>/etc/nagios3/conf.d</code> on your Nagios server.</p>
|
|
|
|
<p>Finally, add <code>zulip</code> to the <code>members</code>
|
|
list for one or more of the contact groups in the <code>CONTACT
|
|
GROUPS</code> section
|
|
of <code>/etc/nagios3/conf.d/contacts.cfg</code>, doing
|
|
something like:
|
|
</p>
|
|
|
|
<div class="codehilite"><pre>define contactgroup{
|
|
contactgroup_name admins
|
|
alias Nagios Administrators
|
|
members monitoring<span class="na">, zulip</span>
|
|
}
|
|
</pre></div>
|
|
|
|
Once you've done that, reload your Nagios configuration
|
|
using <code>/etc/init.d/nagios3 reload</code>.
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When your Nagios
|
|
system makes an alert, you'll see a message like the following,
|
|
to the stream <code>nagios</code> (to change this, edit the
|
|
arguments to <code>nagios-notify-zulip</code>
|
|
in <code>/etc/nagios3/conf.d/zulip_nagios.cfg</code>) with a
|
|
topic indicating the service with an issue:</p>
|
|
<img class="screenshot" src="/static/images/integrations/nagios/001.png" />
|
|
|
|
<p><b>Testing</b><br />If you
|
|
have <a href="http://nagios.sourceforge.net/docs/3_0/extcommands.html">external
|
|
commands enabled in Nagios</a>, you can generate a test notice
|
|
from your Nagios instance by visiting using the <code>Send
|
|
custom service notification</code> command in
|
|
the <code>Service Commands</code> section of any individual
|
|
service's page on your Nagios instance.</p>
|
|
|
|
<p><b>Troubleshooting</b><br />You can confirm whether you've
|
|
correctly configured Nagios to run the Zulip plugin by looking
|
|
for <code>SERVICE NOTIFICATION</code> lines mentioning zulip
|
|
in <code>/var/log/nagios3/nagios.log</code>. You can confirm
|
|
whether you've configured the Zulip plugin code correctly by
|
|
running <code>/usr/local/share/zulip/integrations/nagios/nagios-notify-zulip</code>
|
|
directly.</p>
|
|
</div>
|
|
|
|
<div id="perforce" class="integration-instructions">
|
|
|
|
|
|
<p>Zulip supports integration with Perforce as a
|
|
<a href="http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.scripting.html">trigger</a>
|
|
that fires once a changelist is submitted and committed. To do this:</p>
|
|
|
|
<ol>
|
|
<li>Download and install our <a href="/api">Python bindings</a> on the
|
|
server that hosts your Perforce depot. The Perforce trigger will be
|
|
installed to a location like
|
|
<code>/usr/local/share/zulip/integrations/perforce</code></li>
|
|
|
|
<li>Open <code>integrations/perforce/zulip_perforce_config.py</code> in
|
|
your favorite editor and change the <code>ZULIP_USER</code> and
|
|
<code>ZULIP_API_KEY</code> variables at the top of the file to the
|
|
credentials for the bot you'd like to use for this integration.</li>
|
|
|
|
<li>Edit your
|
|
<a href="http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.scripting.html#d0e14583">trigger table</a>
|
|
with <code>p4 triggers</code> and add an entry something like the
|
|
following:
|
|
|
|
<pre>notify_zulip change-commit //depot/... "python /usr/local/share/zulip/integrations/perforce/zulip_change-commit.py %change% %changeroot%"</pre>
|
|
</li>
|
|
|
|
<li>By default, this hook will send to streams of the form
|
|
<code>depot_subdirectory-commits</code>. So, a changelist that modifies
|
|
files in <code>//depot/foo/bar/baz</code> will result in a message to
|
|
stream <code>foo-commits</code>. Messages about changelists that modify
|
|
files in the depot root or files in multiple direct subdirectories of
|
|
the depot root will be sent to <code>depot-commits</code>. If you'd
|
|
prefer different behavior, such as all commits across your depot going
|
|
to one stream, change it now in <code>zulip_perforce_config.py</code>.
|
|
Make sure that everyone interested in getting these post-commit Zulips
|
|
is subscribed to the relevant streams!</li>
|
|
</ol>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When you commit to your
|
|
Perforce depot the team can see updates in real time in
|
|
Zulip:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/perforce/001.png" />
|
|
</div>
|
|
|
|
|
|
|
|
<div id="phabricator" class="integration-instructions">
|
|
|
|
|
|
<p>Zulip supports Phabricator integration and can notify you of the
|
|
latest items in your Phabricator feed.</p>
|
|
|
|
<p>You can follow the instructions at
|
|
<a href="https://github.com/zulip/phabricator-to-zulip">
|
|
https://github.com/zulip/phabricator-to-zulip
|
|
</a>
|
|
to get it set up.
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div id="pivotal" class="integration-instructions">
|
|
|
|
|
|
<p>Zulip supports Pivotal Tracker integration and can notify you of changes
|
|
to the stories in your Pivotal Tracker project.</p>
|
|
|
|
<p>First, create the stream you'd like to use for Pivotal Tracker
|
|
notifications, and subscribe all interested parties to this stream. We
|
|
recommend the name <code>pivotal</code>.</p>
|
|
|
|
<p>Next, in the Settings page for your project, choose the Integrations
|
|
tab. Scroll down to the <code>Activity Web Hook</code> section, and enter
|
|
the following url:</p>
|
|
|
|
<p><code>{{ external_api_uri }}/v1/external/pivotal?api_key=abcdefgh&stream=pivotal</code></p>
|
|
|
|
<p>where <code>api_key</code> is the API key of your Zulip bot,
|
|
and <code>stream</code> is the stream name you want the
|
|
notifications sent to.</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/pivotal/001.png" />
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When you make changes in Pivotal Tracker they will be reflected in Zulip:</p>
|
|
<img class="screenshot" src="/static/images/integrations/pivotal/002.png" />
|
|
</div>
|
|
|
|
<div id="puppet" class="integration-instructions">
|
|
<p>Zulip supports Puppet integration and can notify you when Puppet runs fail (or when they happen at all).</p>
|
|
|
|
<p>You can follow the instructions at
|
|
<a href="https://forge.puppetlabs.com/mbarr/puppet_zulip">
|
|
https://forge.puppetlabs.com/mbarr/puppet_zulip
|
|
</a>
|
|
to get it set up.
|
|
</p>
|
|
|
|
<p><small>Thanks to Matt from Kensho for submitting this integration!</small></p>
|
|
</div>
|
|
|
|
|
|
<div id="mercurial" class="integration-instructions">
|
|
|
|
<p>Get Zulip notifications when you <code>hg push</code>!</p>
|
|
|
|
<p>First, create the stream you'd like to use for Mercurial notifications,
|
|
and subscribe all interested parties to this stream. We recommend the
|
|
name <code>commits</code>.</p>
|
|
|
|
<p>Next, on your <a href="/#settings" target="_blank">Zulip settings
|
|
page</a>, create a Mercurial bot.</p>
|
|
|
|
<p>Then:</p>
|
|
<ol>
|
|
<li>
|
|
<p>Download and install our <a href="/api">Python bindings</a> on the
|
|
server where the master Mercurial repository lives.</p>
|
|
</li>
|
|
<li>
|
|
<p>Edit the <code>hg/.hgrc</code> configuration file for this master
|
|
Mercurial repository and add the following sections, using the
|
|
credentials for your Mercurial bot and setting the appropriate path to
|
|
the integration hook if it installs in a different location on this
|
|
system:</p>
|
|
|
|
<pre>[hooks]
|
|
changegroup = python:/usr/local/share/zulip/integrations/hg/zulip-changegroup.py:hook
|
|
|
|
[zulip]
|
|
email = "hg-bot@example.com"
|
|
api_key = "0123456789abcdefg"
|
|
stream = "commits"
|
|
{% if api_site_required %}site = {{ external_api_uri }}{% endif %}</pre>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>That's all it takes for the basic setup! On the next <code>hg
|
|
push</code>, you'll get a Zulip update for the changeset.</p>
|
|
|
|
<h3>More configuration options</h3>
|
|
|
|
<p>The Mercurial integration also supports:</p>
|
|
<ul>
|
|
<li>linking to changelog and revision URLs for your repository's web
|
|
UI</li>
|
|
<li>branch whitelists and blacklists</li>
|
|
</ul>
|
|
|
|
<h4>Web repository links</h4>
|
|
|
|
<p>If you've set up your repository to
|
|
be <a href="http://mercurial.selenic.com/wiki/QuickStart#Network_support">browsable
|
|
via the web</a>, add a <code>web_url</code> configuration option to
|
|
the <code>zulip</code> section of your master <code>.hg/hgrc</code> to get
|
|
changelog and revision links in your Zulip notifications:</p>
|
|
|
|
<pre><font color="#B6B6B4">[zulip]
|
|
email = "hg-bot@example.com"
|
|
api_key = "0123456789abcdefg"
|
|
stream = "commits"</font>
|
|
web_url = "http://hg.example.com:8000/"
|
|
{% if api_site_required %}site = {{ external_api_uri }}{% endif %}</pre>
|
|
|
|
|
|
<h4>Branch whitelists and blacklists</h4>
|
|
|
|
<p>By default, this integration will send Zulip notifications for
|
|
changegroup events for all branches. If you'd prefer to only receive Zulip
|
|
notifications for specified branches, add a <code>branches</code>
|
|
configuration option to the <code>zulip</code> section of your
|
|
master <code>.hg/hgrc</code>, containing a comma-separated list of the
|
|
branches that should produce notifications:</p>
|
|
|
|
<pre><font color="#B6B6B4">[zulip]
|
|
email = "hg-bot@example.com"
|
|
api_key = "0123456789abcdefg"
|
|
stream = "commits"</font>
|
|
branches = "prod,master"</pre>
|
|
|
|
<p>You can also exclude branches that you don't want to cause
|
|
notifications. To do so, add an <code>ignore_branches</code> configuration
|
|
option to the <code>zulip</code> section of your
|
|
master <code>.hg/hgrc</code>, containing a comma-separated list of the
|
|
branches that should be ignored:</p>
|
|
|
|
<pre><font color="#B6B6B4">[zulip]
|
|
email = "hg-bot@example.com"
|
|
api_key = "0123456789abcdefg"
|
|
stream = "commits"</font>
|
|
ignore_branches = "noisy,even-more-noisy"</pre>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When team members push new
|
|
changesets with <code>hg push</code>, you'll get a Zulip notification that
|
|
looks like this:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/hg/001.png" />
|
|
</div>
|
|
|
|
<div id="newrelic" class="integration-instructions">
|
|
|
|
|
|
<p>New Relic can send messages to a Zulip stream for alerts and
|
|
deploys.</p>
|
|
|
|
<p>First, create the stream you'd like to use for New Relic
|
|
notifications, and subscribe all interested parties to this stream. We
|
|
recommend the name <code>newrelic</code>.</p>
|
|
|
|
<p>Next, in your New Relic Account Settings page, click
|
|
"Integrations", then "Alerting notifications". On the "Webhook"
|
|
tab, enter the following webhook URL:</p>
|
|
|
|
<p><code>{{ external_api_uri }}/v1/external/newrelic?api_key=abcdefgh&stream=newrelic</code></p>
|
|
|
|
<p>where <code>api_key</code> is the API key of your Zulip bot,
|
|
and <code>stream</code> is the stream name you want the
|
|
notifications sent to.</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/newrelic/001.png" />
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> Your New Relic events will
|
|
appear in Zulip:</p>
|
|
<img class="screenshot" src="/static/images/integrations/newrelic/002.png" />
|
|
</div>
|
|
|
|
<div id="redmine" class="integration-instructions">
|
|
|
|
|
|
<p>Get information on new or updated Redmine issues right in
|
|
Zulip with our Zulip Redmine plugin! Note: this setup must be
|
|
done by a Redmine Administrator.</p>
|
|
|
|
<p>First, create the stream you'd like to use for Redmine notifications,
|
|
and subscribe all interested parties to this stream. We recommend the
|
|
name <code>redmine</code>.</p>
|
|
|
|
<p>Then:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Clone
|
|
the <a href="https://github.com/zulip/zulip-redmine-plugin">Zulip
|
|
Redmine plugin repository</a> by running:</p>
|
|
<pre>git clone https://github.com/zulip/zulip-redmine-plugin</pre>
|
|
</li>
|
|
<li>
|
|
<p>Follow
|
|
the <a href="http://www.redmine.org/projects/redmine/wiki/Plugins">Redmine
|
|
plugin installation guide</a> to install
|
|
the <code>zulip_redmine</code> plugin directory, which is a
|
|
subdirectory of the <code>zulip-redmine-plugin</code> repository
|
|
directory. In a nutshell, the steps are:</p>
|
|
<ol type="A">
|
|
<li>
|
|
<p>Copy the <code>zulip_redmine</code> directory to
|
|
the <code>plugins</code> directory of your Redmine
|
|
instance.</p></li>
|
|
<li>
|
|
<p>Update the Redmine database by running (for Rake 2.X, see the
|
|
guide for instructions for older versions):</p>
|
|
<pre>rake redmine:plugins:migrate RAILS_ENV=production</pre>
|
|
</li>
|
|
<li>
|
|
<p>Restart your Redmine instance.</p>
|
|
</li>
|
|
</ol>
|
|
<p>The Zulip plugin is now registered with Redmine!</p>
|
|
</li>
|
|
<li>
|
|
<p>On your <a href="/#settings" target="_blank">Zulip settings
|
|
page</a>, create a new Redmine bot.</p>
|
|
</li>
|
|
<li>
|
|
<p>To configure Zulip notification settings that apply to many
|
|
projects in one go, in Redmine click the "Administration" link in
|
|
the top left. Click the "Plugins" link on the Administration page,
|
|
and click the "Configure" link to the right of the Zulip plugin
|
|
description. In the "Projects" section, select all projects to which
|
|
you want these settings to apply.</p>
|
|
<p>To configure Zulip notifications for a particular Redmine project,
|
|
visit the project's Settings page.</p>
|
|
<p>
|
|
In either case, fill out the bot email address and API key, and the
|
|
Zulip stream that should receive notifications. Apply your changes.
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>To test the plugin, create an issue or update an existing issue in
|
|
a Redmine project that has Zulip notifications configured (any
|
|
project, if you've configured global settings).</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When you update issues in
|
|
Redmine, the team can see these updates in real time in Zulip:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/redmine/001.png" />
|
|
</div>
|
|
|
|
|
|
<div id="stash" class="integration-instructions">
|
|
<h4>Stash</h4>
|
|
|
|
<p>See what the team is committing to Stash right in Zulip with the Zulip
|
|
Stash plugin!</p>
|
|
|
|
<p>First, create the stream you'd like to use for Stash notifications, and
|
|
subscribe all interested parties to this stream. We recommend the
|
|
name <code>commits</code>.</p>
|
|
|
|
<p>Next, on your <a href="/#settings" target="_blank">Zulip settings
|
|
page</a>, create a Stash bot.</p>
|
|
|
|
<p>Then:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Visit the Settings page for the Project that you'd like to generate
|
|
Zulip notifications. Click the "Hooks" option in the left sidebar, and
|
|
click "Add Hook" on the resulting page. Click the "Search for hook
|
|
plugins" link:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/stash/001.png" />
|
|
</li>
|
|
<li>
|
|
<p>On the search results page, look for and install the "Post-Receive
|
|
WebHook for Stash" plugin:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/stash/002.png" />
|
|
</li>
|
|
<li>
|
|
<p>Return to the Settings page for this Project and click the "Hooks"
|
|
option in the left sidebar. The newly-installed post-receive webhook
|
|
plugin is now listed in the "Post-receive" hooks section. Click the
|
|
edit icon next to the hook to configure it:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/stash/003.png" />
|
|
</li>
|
|
<li>
|
|
<p>Supply the following webhook URL, replacing the bot email address,
|
|
bot API key, and Zulip stream with the appropriate
|
|
information. <b>Note:</b> the <code>@</code>-sign in the bot e-mail
|
|
address must be escaped to <code>%40</code>:</p>
|
|
|
|
<p><code>{{ external_uri_scheme }}<font color="#00A26F">stash-bot%40example.com</font>:<font color="#00A26F">api_key</font>@{{ external_api_path }}/v1/external/stash?stream=<font color="#00A26F">commits</font></code></p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/stash/004.png" />
|
|
</li>
|
|
</ol>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When you push to Stash, the
|
|
team can see these updates in real time in Zulip:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/stash/005.png" />
|
|
</div>
|
|
|
|
|
|
<div id="subversion" class="integration-instructions">
|
|
|
|
|
|
<p>It is easy to send Zulips on SVN commits, by configuring a post-commit
|
|
hook. To do this:</p>
|
|
|
|
<p>First, create the stream you'd like to use for SVN commit
|
|
notifications, and subscribe all interested parties to this stream. The
|
|
integration will use the default stream <code>commits</code> if no stream
|
|
is supplied in the hook; you still need to create the stream even if you
|
|
are using this default.</p>
|
|
|
|
<p>Then:</p>
|
|
|
|
<ol>
|
|
<li>Download and install our <a href="/api">Python bindings</a> on the
|
|
server where the SVN repository lives.</li>
|
|
<li>Install <code>pysvn</code>. On Linux, you can install
|
|
the <code>python-svn</code> package. On other platforms, you can install
|
|
a binary or from source following
|
|
the <a href="http://pysvn.tigris.org/project_downloads.html">instructions
|
|
on the pysvn website</a>.</li>
|
|
<li>Copy <code>integrations/svn/zulip_svn_config.py</code>
|
|
and <code>integrations/svn/post-commit</code> from the API bindings
|
|
directory to the <code>hooks</code> subdirectory of your SVN
|
|
repository.</li>
|
|
|
|
<li><p>Next, open <code>integrations/git/zulip_svn_config.py</code>
|
|
in your favorite editor, and change the following lines to
|
|
configure your SVN integration:</p>
|
|
|
|
<div class="codehilite"><pre><span class="n">ZULIP_USER</span> <span class="o">=</span> <span class="s">"svn-bot@example.com"</span>
|
|
<span class="n">ZULIP_API_KEY</span> <span class="o">=</span> <span class="s">"0123456789abcdef0123456789abcdef"</span>
|
|
{% if api_site_required %}<span class="n">ZULIP_SITE</span> <span class="o">=</span> <span class="s">"{{ external_api_uri }}"</span>{% endif %}</pre></div>
|
|
</li>
|
|
|
|
<li>The default stream used by this post-commit hook
|
|
is <code>commits</code>; if you'd prefer a different stream, change it
|
|
now in <code>zulip_svn_config.py</code>. Make sure that everyone
|
|
interested in getting these post-commit Zulips is subscribed to that
|
|
stream!</li>
|
|
</ol>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When you commit to this SVN
|
|
repository, the team can see these updates in real time in Zulip:</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/svn/001.png" />
|
|
</div>
|
|
|
|
<div id="trac" class="integration-instructions">
|
|
|
|
|
|
<p>First, create the stream you'd like to use for Trac notifications, and
|
|
subscribe all interested parties to this stream. The integration will use
|
|
the default stream <code>trac</code> if no stream is supplied in the
|
|
hook; you still need to create the stream even if you are using this
|
|
default.</p>
|
|
|
|
<p>Next, download and install our <a href="/api">Python
|
|
bindings and example scripts</a> on your Trac server.</p>
|
|
|
|
<p>Next, open <code>integrations/trac/zulip_trac_config.py</code> in
|
|
your favorite editor, and change the following lines to specify
|
|
your bot's email address, API key, and where you'd like your
|
|
notification messages to go (by default,
|
|
stream <code>trac</code>):</p>
|
|
|
|
<div class="codehilite"><pre><span class="n">ZULIP_USER</span> <span class="o">=</span> <span class="s">"trac-notifications-bot@example.com"</span>
|
|
<span class="n">ZULIP_API_KEY</span> <span class="o">=</span> <span class="s">"0123456789abcdef0123456789abcdef"</span>
|
|
<span class="n">STREAM_FOR_NOTIFICATIONS</span> <span class="o">=</span> <span class="s">"trac"</span>
|
|
<span class="n">TRAC_BASE_TICKET_URL</span> <span class="o">=</span> <span class="s">"https://trac.example.com/ticket"</span>
|
|
{% if api_site_required %}<span class="n">ZULIP_SITE</span> <span class="o">=</span> <span class="s">"{{ external_api_uri }}"</span>{% endif %}</pre></div>
|
|
|
|
<p>Copy <code>integrations/trac/zulip_trac.py</code>
|
|
and <code>integrations/trac/zulip_trac_config.py</code> into
|
|
your Trac installation's <code>plugins/</code>
|
|
subdirectory. Once you've done that, edit your Trac
|
|
installation's <code>conf/trac.ini</code> to
|
|
add <code>zulip_trac</code> to the <code>[components]</code>
|
|
section, as follows:</p>
|
|
|
|
<div class="codehilite"><pre><span class="k">[components]</span>
|
|
<span class="na">zulip_trac</span> <span class="o">=</span> <span class="s">enabled</span></pre></div>
|
|
|
|
<p>You may then need to restart Trac (or Apache) so that Trac will load our plugin.</p>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When people open
|
|
new tickets (or edit existing tickets), you'll see a message
|
|
like the following, to the stream <code>trac</code> (or whatever
|
|
you configured above) with a topic that matches the ticket
|
|
name:</p>
|
|
<img class="screenshot" src="/static/images/integrations/trac/001.png" />
|
|
|
|
<p><b>Additional trac configuration</b><br /> After using the plugin
|
|
for a while, you may want to customize which changes to tickets
|
|
result in a Zulip notification using
|
|
the <code>TRAC_NOTIFY_FIELDS</code> setting
|
|
in <code>zulip_trac_config.py</code>.</p>
|
|
</div>
|
|
|
|
<div id="trello" class="integration-instructions">
|
|
|
|
|
|
<p>First, create the stream you'd like to use for Trello notifications,
|
|
and subscribe all interested parties to this stream. We recommend the
|
|
name <code>trello</code>.</p>
|
|
|
|
<p>Next, download a copy
|
|
of <a href="https://github.com/nathanlws/trello-to-zulip">trello-to-zulip</a>
|
|
and follow the instructions in <code>README.md</code>. When you
|
|
make changes in Trello, they will be reflected in Zulip:
|
|
</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/trello/001.png" />
|
|
<p><small>Thanks to Nathan from FoundationDB for <a href="https://github.com/nathanlws/trello-to-zulip">submitting this integration</a>!</small></p>
|
|
</div>
|
|
|
|
<div id="twitter" class="integration-instructions">
|
|
|
|
|
|
<p>See Twitter search results in Zulip! This is great for seeing and
|
|
discussing who is talking about you, friends, competitors, or important
|
|
topics in real time.</p>
|
|
|
|
<p>First, create the stream you'd like to use for tweets, and subscribe
|
|
all interested parties to this stream. We recommend the
|
|
name <code>twitter</code>.</p>
|
|
|
|
<p>Next, download and install our <a href="/api">Python bindings and
|
|
example scripts</a>. This bot should be set up on a trusted machine,
|
|
because your API key is visible to local users through the command line or
|
|
config file.</p>
|
|
|
|
<p>Next, install <b>version 1.0 or later</b> of
|
|
the <code>twitter-python</code> library. If your operating system
|
|
distribution doesn't package a new enough version, you can install the
|
|
library from source
|
|
from <a href="https://github.com/bear/python-twitter">the GitHub
|
|
repository</a>.</p>
|
|
|
|
<p>Next, set up Twitter authentication. This bot uses OAuth to
|
|
authenticate with Twitter, and in order to obtain a consumer key & secret,
|
|
you must register a new application under your Twitter account:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
Log in to <a href="http://dev.twitter.com">http://dev.twitter.com</a>.
|
|
</li>
|
|
<li>
|
|
In the menu under your username,
|
|
click <a href="https://dev.twitter.com/apps">My Applications</a>. From
|
|
this page, create a new application.
|
|
</li>
|
|
<li>
|
|
Click on the application you created and click "create my access
|
|
token". Fill in the requested values.
|
|
</li>
|
|
</ol>
|
|
|
|
<p>To configure and deploy this bot:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
Create a <code>~/.zulip_twitterrc</code> with the following
|
|
contents:
|
|
|
|
<pre>[twitter]
|
|
consumer_key =
|
|
consumer_secret =
|
|
access_token_key =
|
|
access_token_secret =</pre>
|
|
</li>
|
|
<li>
|
|
Test the script by running it manually:
|
|
|
|
<pre>/usr/local/share/zulip/integrations/twitter/twitter-search-bot --search="@nprnews,quantum physics"</pre>
|
|
|
|
Note: <code>twitter-search-bot</code> may install to a different
|
|
location on your operating system distribution.
|
|
</li>
|
|
<li>
|
|
Configure a crontab entry for this script. A sample crontab entry that
|
|
will process tweets every minute is:
|
|
|
|
<pre>* * * * * /usr/local/share/zulip/integrations/twitter/twitter-search-bot --search="@nprnews,quantum physics"</pre>
|
|
</li>
|
|
</ol>
|
|
|
|
<p><b>Congratulations! You're done!</b><br /> When someone tweets a
|
|
message containing one of your search terms, you'll get a Zulip on your
|
|
specified stream, with the search term as the topic.</p>
|
|
|
|
<img class="screenshot" src="/static/images/integrations/twitter/001.png" />
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block customhead %}
|
|
{{ block.super }}
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
$("a.title").addClass("show-integral");
|
|
$("a.title").prepend($("<span class='integral'>∫</span>"));
|
|
$("a.title").hover(function (e) {
|
|
$(".integral").css("display", "inline");
|
|
var width = $(".integral").width();
|
|
$("a.title").css("left", -1 * width);
|
|
},
|
|
function (e) {
|
|
$(".integral").css("display", "none");
|
|
$("a.title").css("left", 0);
|
|
});
|
|
|
|
var newlozenge,
|
|
currentblock,
|
|
currentlink,
|
|
currentlozenge,
|
|
instructionbox = $("#integration-instruction-block"),
|
|
hashes = $('.integration-instructions').map(function() {
|
|
return this.id || null;
|
|
}).get();
|
|
|
|
|
|
|
|
function switchToIntegration(integrationHash) {
|
|
var cleanHash = integrationHash.substr(1);
|
|
if (hashes.indexOf(cleanHash) > -1) {
|
|
currentblock = $(integrationHash);
|
|
currentlozenge = $(".integration-lozenge.integration-" + cleanHash);
|
|
$(".integration-lozenges").hide();
|
|
newlozenge = currentlozenge.clone();
|
|
newlozenge.find(".integration-logo").unwrap();
|
|
newlozenge.addClass("integration-lozenge-static");
|
|
instructionbox.hide();
|
|
instructionbox.children(".integration-lozenge").remove();
|
|
instructionbox.children(".integration-instructions").appendTo("#integration-instructions-group");
|
|
instructionbox.append(newlozenge);
|
|
instructionbox.append(currentblock);
|
|
instructionbox.show();
|
|
$("#integration-list-link").css("display", "block");
|
|
window.scrollTo(0,0);
|
|
}
|
|
}
|
|
|
|
function updateHash () {
|
|
if (document.location.hash) {
|
|
switchToIntegration(document.location.hash);
|
|
}
|
|
else if (currentblock && newlozenge) {
|
|
$("#integration-list-link").css("display", "none");
|
|
$(".integration-lozenges").show();
|
|
instructionbox.hide();
|
|
newlozenge.remove();
|
|
currentblock.appendTo("#integration-instructions-group");
|
|
}
|
|
}
|
|
|
|
window.onhashchange = updateHash;
|
|
updateHash();
|
|
});
|
|
</script>
|
|
|
|
{% endblock %}
|