Zulip Git integration
Get Zulip notifications for pushes to your Git repositories!
Note that Zulip also offers integrations for GitHub, GitLab and various other version control hosting services.
-
Create a bot for Git. Make sure that you select Incoming webhook as the Bot type.
-
Download and install our Python bindings and example scripts on the system where the Git integration script will be run from.
-
If your Git server and your Zulip server are on the same machine, symlink the
post-receivehook of your Git repository in your Git server by running:ln -s /usr/local/share/zulip/integrations/git/post-receive your-repo.git/hooks/post-receive
Otherwise, copy the
post-receivehook to your Git repository's/hooksdirectory.The
post-receivehook is triggered on every push to the repository. -
Open
/usr/local/share/zulip/integrations/git/zulip_git_config.pywith your favorite editor, and change the following lines to specify the email address and API key for your Git bot:ZULIP_USER = "git-bot@chat.zulip.org" ZULIP_API_KEY = "0123456789abcdef0123456789abcdef" ZULIP_SITE = "https://chat.zulip.org" -
Copy the config file to the same directory as the
post-receivehook.cp /usr/local/share/zulip/integrations/git/zulip_git_config.py your-repo.git/hooks
Use the test-post-receive branch to test the integration without
modifying your main branch.
Configuration options
In /usr/local/share/zulip/integrations/git/zulip_git_config.py, you can set:
-
The channel where notifications are sent by updating the value of
STREAM_NAME. By default, notifications are sent to a channel named "commits". -
Which branches send notifications when pushed by updating the
commit_notice_destinationfunction. By default, pushes to themain,master, andtest-post-receivebranches will result in notifications. -
The message format used in your Zulip notifications by updating the
format_commit_messagefunction.
Logos are trademarks of their respective owners. None of the integrations on this page are created by, affiliated with, or supported by the companies represented by the logos.