Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3a2c96e

Browse files
Niloth-ptimabbott
authored andcommitted
integration-docs: Update the Git integration doc.
1 parent445ea13 commit3a2c96e

File tree

1 file changed

+41
-18
lines changed

1 file changed

+41
-18
lines changed

‎zulip/integrations/git/doc.md

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,54 @@
1-
Get Zulipnotifications for yourGitrepositories!
1+
#Zulip Gitintegration
22

3-
1. {!create-an-incoming-webhook.md!}
3+
Get Zulip notifications for pushes to your Git repositories!
44

5-
1. {!download-python-bindings.md!}
5+
Note that Zulip also offers integrations for[GitHub](./github),
6+
[GitLab](./gitlab) and various other
7+
[version control hosting services][other-integrations].
68

7-
1. {!create-channel.md!}
9+
{start_tabs}
810

9-
1.{!change-zulip-config-file.md!}
11+
1. {!create-an-incoming-webhook.md!}
1012

11-
You may also need to change the value of`STREAM_NAME`.
13+
1. {!download-python-bindings.md!}
1214

13-
You can specify the branches that will be used for notifications by modifying
14-
the`commit_notice_destination` function. By default,
15-
pushes to the`main`,`master`, and`test-post-receive` branches will result in a
16-
notification.
15+
1. If your Git server and your Zulip server are on the same machine,
16+
symlink the`post-receive` hook of your Git repository in your Git
17+
server by running:
1718

18-
1. Symlink`/usr/local/share/zulip/integrations/git/zulip_git_config.py`
19-
to the`.git/hooks` directory of your Git repository.
19+
`ln -s {{ integration_path }}/post-receive your-repo.git/hooks/post-receive`
2020

21-
1. Symlink`/usr/local/share/zulip/integrations/git/post-receive`
22-
to the`.git/hooks` directory of your Git repository.
21+
Otherwise, copy the`post-receive` hook to your Git repository's
22+
`/hooks` directory.
23+
24+
The`post-receive` hook is triggered on every push to the repository.
25+
26+
1. {!change-zulip-config-file.md!}
27+
28+
1. Copy the config file to the same directory as the`post-receive` hook.
29+
30+
`cp {{ config_file_path }} your-repo.git/hooks`
2331

2432
!!! tip ""
2533

26-
You can test the plugin without changing your `main` branch by
27-
pushing to the `test-post-receive` branch.
34+
Use the `test-post-receive` branch to test the integration without
35+
modifying your `main` branch.
36+
37+
{end_tabs}
38+
39+
###Configuration options
40+
41+
In`{{ config_file_path }}`, you can set:
42+
43+
- The channel where notifications are sent by updating the value of
44+
`STREAM_NAME`. By default, notifications are sent to a channel named
45+
"commits".
46+
47+
- Which branches send notifications when pushed by updating the
48+
`commit_notice_destination` function. By default, pushes to the`main`,
49+
`master`, and`test-post-receive` branches will result in notifications.
2850

29-
{!congrats.md!}
51+
- The message format used in your Zulip notifications by updating the
52+
`format_commit_message` function.
3053

31-
![Git bot message](/static/images/integrations/git/001.png)
54+
[other-integrations]:../version-control

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp