integrations/git: Use macros and improve Markdown.

This commit is contained in:
Eeshan Garg 2017-06-21 22:38:11 -02:30 committed by showell
parent 6a84b50758
commit 9dde906115
2 changed files with 11 additions and 19 deletions

View File

@ -1,31 +1,19 @@
{!download-python-bindings.md!}
Next, create the stream youd like to use for Git notifications, and
subscribe all interested parties to this stream. The integration will
use the default stream `commits` if no stream is supplied in the hook;
you still need to create the stream even if you are using this
default.
{!create-stream.md!}
Next, open `integrations/git/zulip_git_config.py` in your favorite
editor, and change the following lines to specify the email address
and API key for your Git bot:
```
ZULIP_USER = "git-bot@example.com"
ZULIP_API_KEY = "0123456789abcdef0123456789abcdef"
{% if api_site_required %}ZULIP_SITE = "{{ external_api_uri_subdomain }}"{% endif %}
```
{!change-zulip-config-file.md!}
You can also specify which pushes will result in notifications and to
what stream the notifications will be sent by modifying the
`commit_notice_destination` function in `zulip_git_config.py`. By
default, pushes to the `master` and `test-post-receive` branches will
result in a notification to stream `commits`.
result in a notification to the stream `commits`.
Save `integrations/git/zulip_git_config.py` to the `.git/hooks`
directory of your git repository.
Symlink `/usr/local/share/zulip/integrations/git/post-receive` into
Symlink `/usr/local/share/zulip/integrations/git/post-receive` to
the `.git/hooks` directory of your git repository.
Whenever you make a push to the `master` branch of your git repository

View File

@ -253,7 +253,11 @@ INTEGRATIONS = {
'capistrano': Integration('capistrano', 'capistrano', display_name='Capistrano', doc='zerver/integrations/capistrano.md'),
'codebase': Integration('codebase', 'codebase', doc='zerver/integrations/codebase.md'),
'email': EmailIntegration('email', 'email', doc='zerver/integrations/email.md'),
'git': Integration('git', 'git', doc='zerver/integrations/git.md'),
'git': Integration(
'git', 'git',
doc='zerver/integrations/git.md',
stream_name='commits',
),
'google-calendar': Integration(
'google-calendar',
'google-calendar',