diff --git a/templates/zerver/integrations/index.html b/templates/zerver/integrations/index.html index 96023cd9f4..0952ae35c1 100644 --- a/templates/zerver/integrations/index.html +++ b/templates/zerver/integrations/index.html @@ -117,65 +117,6 @@ {% endif %} -
- - -

First, create the stream you'd like to use for Trac notifications, and - subscribe all interested parties to this stream. The integration will use - the default stream trac if no stream is supplied in the - hook; you still need to create the stream even if you are using this - default.

- -

Next, download and install our Python - bindings and example scripts on your Trac server.

- -

Next, open integrations/trac/zulip_trac_config.py in - your favorite editor, and change the following lines to specify - your bot's email address, API key, and where you'd like your - notification messages to go (by default, - stream trac):

- -
ZULIP_USER = "trac-notifications-bot@example.com"
-ZULIP_API_KEY = "0123456789abcdef0123456789abcdef"
-STREAM_FOR_NOTIFICATIONS = "trac"
-TRAC_BASE_TICKET_URL = "https://trac.example.com/ticket"
-{% if api_site_required %}ZULIP_SITE = "{{ external_api_uri_subdomain }}"{% endif %}
- -

Copy integrations/trac/zulip_trac.py - and integrations/trac/zulip_trac_config.py into - your Trac installation's plugins/ - subdirectory. Once you've done that, edit your Trac - installation's conf/trac.ini to - add zulip_trac to the [components] - section, as follows:

- -
[components]
-zulip_trac = enabled
- -

You may then need to restart Trac (or Apache) so that Trac will load our plugin.

- -

Congratulations! You're done!
When people open - new tickets (or edit existing tickets), you'll see a message - like the following, to the stream trac (or whatever - you configured above) with a topic that matches the ticket - name:

- - -

Additional trac configuration
After using the plugin - for a while, you may want to customize which changes to tickets - result in a Zulip notification using - the TRAC_NOTIFY_FIELDS setting - in zulip_trac_config.py.

- -

- 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. -

- -
-

This legacy integration for Trello works by running a script diff --git a/templates/zerver/integrations/trac.html b/templates/zerver/integrations/trac.html new file mode 100644 index 0000000000..5893c1d179 --- /dev/null +++ b/templates/zerver/integrations/trac.html @@ -0,0 +1,64 @@ +

+ First, create the stream you'd like to use for Trac notifications, and + subscribe all interested parties to this stream. The integration will use + the default stream trac if no stream is supplied in the + hook; you still need to create the stream even if you are using this + default. +

+ +

+ Next, download and install our + + Python bindings and example scripts + + on your Trac server. +

+ +

+ Next, open integrations/trac/zulip_trac_config.py in + your favorite editor, and change the following lines to specify + your bot's email address, API key, and where you'd like your + notification messages to go (by default, + stream trac): +

+ +
ZULIP_USER = "trac-notifications-bot@example.com"
+ZULIP_API_KEY = "0123456789abcdef0123456789abcdef"
+STREAM_FOR_NOTIFICATIONS = "trac"
+TRAC_BASE_TICKET_URL = "https://trac.example.com/ticket"
+{% if api_site_required %}ZULIP_SITE ="{{ external_api_uri_subdomain }}"{% endif %}
+
+ +

+ Copy integrations/trac/zulip_trac.py + and integrations/trac/zulip_trac_config.py into + your Trac installation's plugins/ + subdirectory. Once you've done that, edit your Trac + installation's conf/trac.ini to + add zulip_trac to the [components] + section, as follows: +

+ +
[components]
+zulip_trac = enabled
+
+ +

You may then need to restart Trac (or Apache) so that Trac will load our plugin.

+ +

+ Congratulations! You're done!
When people open + new tickets (or edit existing tickets), you'll see a message + like the following, to the stream trac (or whatever + you configured above) with a topic that matches the ticket + name: +

+ + +

+ Additional trac configuration
After using the plugin + for a while, you may want to customize which changes to tickets + result in a Zulip notification using + the TRAC_NOTIFY_FIELDS setting + in zulip_trac_config.py. +

diff --git a/tools/check-templates b/tools/check-templates index c0786a3eb4..382c324809 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -134,6 +134,7 @@ def check_html_templates(templates, all_dups): 'templates/zerver/integrations/nagios.html', 'templates/zerver/integrations/openshift.html', 'templates/zerver/integrations/subversion.html', + 'templates/zerver/integrations/trac.html', ] validate(fn=fn, check_indent=(fn not in bad_files)) @@ -196,6 +197,7 @@ def check_html_templates(templates, all_dups): 'templates/zerver/integrations/nagios.html', 'templates/zerver/integrations/openshift.html', 'templates/zerver/integrations/subversion.html', + 'templates/zerver/integrations/trac.html', ] # TODO: Clean these files for fn in templates: diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py index 2588655e6a..0f4551e260 100644 --- a/zerver/lib/integrations.py +++ b/zerver/lib/integrations.py @@ -228,7 +228,7 @@ INTEGRATIONS = { 'redmine': Integration('redmine', 'redmine', doc='zerver/integrations/redmine.html'), 'rss': Integration('rss', 'rss', display_name='RSS', doc='zerver/integrations/rss.html'), 'subversion': Integration('subversion', 'subversion', doc='zerver/integrations/subversion.html'), - 'trac': Integration('trac', 'trac'), + 'trac': Integration('trac', 'trac', doc='zerver/integrations/trac.html'), 'trello-plugin': Integration( 'trello-plugin', 'trello-plugin',