mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Migrate integrations/mercurial.html to markdown.
This commit is contained in:
committed by
Tim Abbott
parent
6fec949678
commit
a1f24dc6a3
@@ -1,105 +0,0 @@
|
|||||||
<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 {{ settings_html|safe }}, 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_subdomain }}{% 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_subdomain }}{% 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"/>
|
|
||||||
83
templates/zerver/integrations/mercurial.md
Normal file
83
templates/zerver/integrations/mercurial.md
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
Get Zulip notifications when you `hg push`!
|
||||||
|
|
||||||
|
First, create the stream you’d like to use for Mercurial
|
||||||
|
notifications, and subscribe all interested parties to this stream. We
|
||||||
|
recommend the name `commits`.
|
||||||
|
|
||||||
|
Next, on your {{ settings_html|safe }}, create a Mercurial bot.
|
||||||
|
|
||||||
|
Then:
|
||||||
|
|
||||||
|
1. {! download-python-bindings.md !}
|
||||||
|
|
||||||
|
2. Edit the `hg/.hgrc` 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:
|
||||||
|
|
||||||
|
[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_subdomain }}{% endif %}
|
||||||
|
|
||||||
|
That’s all it takes for the basic setup! On the next `hg push`, you’ll
|
||||||
|
get a Zulip update for the changeset.
|
||||||
|
|
||||||
|
### More configuration options
|
||||||
|
|
||||||
|
The Mercurial integration also supports:
|
||||||
|
|
||||||
|
- linking to changelog and revision URLs for your repository’s web UI
|
||||||
|
- branch whitelists and blacklists
|
||||||
|
|
||||||
|
#### Web repository links
|
||||||
|
|
||||||
|
If you’ve set up your repository to be
|
||||||
|
[browsable via the web](http://mercurial.selenic.com/wiki/QuickStart#Network_support),
|
||||||
|
add a `web_url` configuration option to the `zulip` section of your
|
||||||
|
master `.hg/hgrc` to get changelog and revision links in your Zulip
|
||||||
|
notifications:
|
||||||
|
|
||||||
|
[zulip]
|
||||||
|
email = "hg-bot@example.com"
|
||||||
|
api_key = "0123456789abcdefg"
|
||||||
|
stream = "commits"
|
||||||
|
web_url = "http://hg.example.com:8000/"
|
||||||
|
{% if api_site_required %}site = {{ external_api_uri_subdomain }}{% endif %}
|
||||||
|
|
||||||
|
#### Branch whitelists and blacklists
|
||||||
|
|
||||||
|
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 `branches`
|
||||||
|
configuration option to the `zulip` section of your master `.hg/hgrc`,
|
||||||
|
containing a comma-separated list of the branches that should produce
|
||||||
|
notifications:
|
||||||
|
|
||||||
|
[zulip]
|
||||||
|
email = "hg-bot@example.com"
|
||||||
|
api_key = "0123456789abcdefg"
|
||||||
|
stream = "commits"
|
||||||
|
branches = "prod,master"
|
||||||
|
|
||||||
|
You can also exclude branches that you don’t want to cause
|
||||||
|
notifications. To do so, add an `ignore_branches` configuration option
|
||||||
|
to the `zulip` section of your master `.hg/hgrc`, containing a
|
||||||
|
comma-separated list of the branches that should be ignored:
|
||||||
|
|
||||||
|
[zulip]
|
||||||
|
email = "hg-bot@example.com"
|
||||||
|
api_key = "0123456789abcdefg"
|
||||||
|
stream = "commits"
|
||||||
|
ignore_branches = "noisy,even-more-noisy"
|
||||||
|
|
||||||
|
When team members push new changesets with `hg push`, you’ll get a
|
||||||
|
Zulip notification.
|
||||||
|
|
||||||
|
{! congrats.md !}
|
||||||
|
|
||||||
|

|
||||||
@@ -244,7 +244,7 @@ INTEGRATIONS = {
|
|||||||
'mercurial',
|
'mercurial',
|
||||||
'mercurial',
|
'mercurial',
|
||||||
display_name='Mercurial (hg)',
|
display_name='Mercurial (hg)',
|
||||||
doc='zerver/integrations/mercurial.html'
|
doc='zerver/integrations/mercurial.md'
|
||||||
),
|
),
|
||||||
'nagios': Integration('nagios', 'nagios', doc='zerver/integrations/nagios.html'),
|
'nagios': Integration('nagios', 'nagios', doc='zerver/integrations/nagios.html'),
|
||||||
'openshift': Integration(
|
'openshift': Integration(
|
||||||
|
|||||||
Reference in New Issue
Block a user