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.

  1. Create a bot for Git. Make sure that you select Incoming webhook as the Bot type.

  2. Download and install our Python bindings and example scripts on the system where the Git integration script will be run from.

  3. If your Git server and your Zulip server are on the same machine, symlink the post-receive hook 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-receive hook to your Git repository's /hooks directory.

    The post-receive hook is triggered on every push to the repository.

  4. Open /usr/local/share/zulip/integrations/git/zulip_git_config.py with your favorite editor, and change the following lines to specify the email address and API key for your Git bot:

    ZULIP_USER = "git-bot@z.u1v.ru"
    ZULIP_API_KEY = "0123456789abcdef0123456789abcdef"
    ZULIP_SITE = "https://z.u1v.ru"
    
  5. Copy the config file to the same directory as the post-receive hook.

    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.

You're done! Your Git notifications may look like this:

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_destination function. By default, pushes to the main, master, and test-post-receive branches will result in notifications.

  • The message format used in your Zulip notifications by updating the format_commit_message function.

Existing post-receive hooks must be composed rather than overwritten. The default branch filter sends only main, master, and test-post-receive. History rewrites can produce an @everyone notification; test the policy before enabling it.

Deployment and access

Run the hook on the repository server with access to the organization's HTTPS API. SaaS, hybrid, on-premises, and carrier-managed deployments require an agreed network route. Separate bots, configuration, and destination channels per customer. Subscribe the bot and grant private-channel access explicitly. Protect the credential files; repository notifications can expose commit subjects, author identities, and links to readers without repository access.

These are post-change notifications, not repository replication, backup, or permission synchronization. The bundled senders do not provide a durable retry queue or prove delivery by completing the hook. Monitor API errors separately. Bot API keys authenticate access; customer-managed BYOK storage keys and their rotation are configured separately.

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.