Subversion

Version control

Back to list

Zulip Subversion Integration

Get Zulip notifications for your Subversion commits by configuring a post-commit hook!

  1. Create a bot for Subversion. 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 Subversion integration script will be run from.

  3. Install the dependencies for the integration with:

    pip install -r /usr/local/share/zulip/integrations/svn/requirements.txt
  4. If your Subversion server and your Zulip server are on the same machine, symlink the post-commit hook of your Subversion repository in your Subversion server by running:

    ln -s /usr/local/share/zulip/integrations/svn/post-commit your-repo/hooks/post-commit

    Otherwise, copy the post-commit hook to your Subversion repository's /hooks directory.

    The post-commit hook is triggered after every commit.

  5. Open /usr/local/share/zulip/integrations/svn/zulip_svn_config.py with your favorite editor, and change the following lines to specify the email address and API key for your Subversion bot:

    ZULIP_USER = "svn-bot@chat.zulip.org"
    ZULIP_API_KEY = "0123456789abcdef0123456789abcdef"
    ZULIP_SITE = "https://chat.zulip.org"
    
  6. Copy the config file to the same directory as the post-commit hook.

    cp /usr/local/share/zulip/integrations/svn/zulip_svn_config.py your-repo/hooks

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

SVN commit bot message

Configuration options

You can configure the channel and topic where notifications are sent by updating the commit_notice_destination function in /usr/local/share/zulip/integrations/svn/zulip_svn_config.py. By default, notifications are sent to the #commits channel with the repository as the topic name.

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.