mirror of https://github.com/zulip/zulip.git
integrations/git: Use macros and improve Markdown.
This commit is contained in:
parent
6a84b50758
commit
9dde906115
|
@ -1,38 +1,26 @@
|
||||||
{! download-python-bindings.md !}
|
{!download-python-bindings.md!}
|
||||||
|
|
||||||
Next, create the stream you’d like to use for Git notifications, and
|
{!create-stream.md!}
|
||||||
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.
|
|
||||||
|
|
||||||
Next, open `integrations/git/zulip_git_config.py` in your favorite
|
{!change-zulip-config-file.md!}
|
||||||
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 %}
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also specify which pushes will result in notifications and to
|
You can also specify which pushes will result in notifications and to
|
||||||
what stream the notifications will be sent by modifying the
|
what stream the notifications will be sent by modifying the
|
||||||
`commit_notice_destination` function in `zulip_git_config.py`. By
|
`commit_notice_destination` function in `zulip_git_config.py`. By
|
||||||
default, pushes to the `master` and `test-post-receive` branches will
|
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`
|
Save `integrations/git/zulip_git_config.py` to the `.git/hooks`
|
||||||
directory of your git repository.
|
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.
|
the `.git/hooks` directory of your git repository.
|
||||||
|
|
||||||
Whenever you make a push to the `master` branch of your git repository
|
Whenever you make a push to the `master` branch of your git repository
|
||||||
(or whatever you configured above), the Zulip git plugin will send an
|
(or whatever you configured above), the Zulip git plugin will send an
|
||||||
automated notification.
|
automated notification.
|
||||||
|
|
||||||
{! congrats.md !}
|
{!congrats.md!}
|
||||||
|
|
||||||
![](/static/images/integrations/git/001.png)
|
![](/static/images/integrations/git/001.png)
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,11 @@ INTEGRATIONS = {
|
||||||
'capistrano': Integration('capistrano', 'capistrano', display_name='Capistrano', doc='zerver/integrations/capistrano.md'),
|
'capistrano': Integration('capistrano', 'capistrano', display_name='Capistrano', doc='zerver/integrations/capistrano.md'),
|
||||||
'codebase': Integration('codebase', 'codebase', doc='zerver/integrations/codebase.md'),
|
'codebase': Integration('codebase', 'codebase', doc='zerver/integrations/codebase.md'),
|
||||||
'email': EmailIntegration('email', 'email', doc='zerver/integrations/email.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': Integration(
|
||||||
'google-calendar',
|
'google-calendar',
|
||||||
'google-calendar',
|
'google-calendar',
|
||||||
|
|
Loading…
Reference in New Issue