Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

TracTicketMSTeamsDispatcher

NOTE: the code is tested on a Trac 1.5.x so it will work with python 3 but since I use features like F-Strings it wont with python 2.x out of the box!

The plugin has the intention to provide a way to send information about the creation or the change of a ticket to a service like MS Teams via a webhook. That said the name points out it's meant to work only for ms teams but that's not entirely true since we can send off information to any kind of webhook that expects a payload. Of course we need to define a well-formed payload for every service and so we started out with ms teams. In the future it might be possible to send a payload to discord or some other fanzy web api.

HINT: a proof of concept payload for discord is already in the code but not really useful at this stage.

Lets get back to what we can do at this point. After the installation of the plugin you should get a new plugin under the plugins section of the trac adminstration. If we enable the plugin we get a new administration section called Webhook Dispatcher. There we can define our first webhook and save it. As soon as we got this we can use the checkbox Notify MS Teams in the ticket properties to send off a payload when a ticket is created or changed. To see what values are set in the trac.ini and the admin page read the sections further down in this document. The plugin also adds some new database tables to provide a way to add, edit or delete payloads and payload details.

install


  • clone repo or download the zip archive

    $ git clone https://github.com/rosjat/TracTicketMSTeamsDispatcherPlugin.git

  • build a python egg

    $ python setup.py bdist_egg

  • copy the egg file in you trac projects plugins folder

  • install it in site-packages with pip (you might use a venv when using this version). The example assumes that you are in the cloned directory.

    $ pip install . or from pypi $ pip install TracTicketMSTeamsDispatcher

  • reload trac

trac.ini settings


the Plugin will create under [ticket-custom]:

  • tmsd = checkbox
  • ttmsd.label = Notify MS Teams
  • ttmsd.value = 1

Plugin Settings


there will be a section under Plugins to enable/disable the plugin. If enabled you get a section Webhook Dispatcher and under this section you will have Payloads and Webhooks if enabled.

Webhook Dispatcher Section


Payloads

In Payloads you can set a values for a various types of payloads and save it. You can also add or delete some Facts to a payload. For now the plugin only provides payloads for MS Teams but might add payloads for other kinds of services like discord.

A MS Teams Payload consists of payload values itself, sections that itself have facts. In the frontend you will be able to edit the following values (for now).

  • 2 payloads, one for Ticket create annd one for Ticket change
    • NOTE: if you change the payload type of the predefined payloads you might end up not sending payloads on the desired ticket event!!!
  • A paload template consists of
    • a Section(for now)
      • and facts in this section, you could add, delete, change them.
    • payload values can be ticket values or some text values set by the user. All values that need to come from the ticket will be set from a dropdown.

Webhooks

In Webhooks you can add, edit or delete webhooks. For now we only provide a way to send MS Teams payloads but we can define discord webhooks here too.

TODO / Features


  • more sane documentation in the code
  • adding localization support for the payloads
  • making the ship off of payloads async (dont know if this is possible)
  • structure the package better and code cleanup, there is space for inprovment for sure!
  • adding some typing

Metadata

Release files for TracTicketMSTeamsDispatcher 0.7.0.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TracTicketMSTeamsDispatcher 0.7.0.dev0
File Size Uploaded Provenance Actions
TracTicketMSTeamsDispatcher-0.7.0.dev0.tar.gz 26.8 kB Without provenance Details for TracTicketMSTeamsDispatcher-0.7.0.dev0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for TracTicketMSTeamsDispatcher 0.7.0.dev0
File Interpreter ABI Platform Actions
TracTicketMSTeamsDispatcher-0.7.0.dev0-py3-none-any.whl Python 3 none any Details for TracTicketMSTeamsDispatcher-0.7.0.dev0-py3-none-any.whl

Total release size: 58.5 kB

Release files / TracTicketMSTeamsDispatcher-0.7.0.dev0.tar.gz

Download URL TracTicketMSTeamsDispatcher-0.7.0.dev0.tar.gz
Size 26.8 kB
Tags Source
SHA-256 checksum
How to use checksums
89dd968a9d74aba111276e518a715d464f527a2e0bdd325e5cc1547b7fb4837f
BLAKE2b-256 checksum
How to use checksums
d18bf87217d8420f99a0bd426341be40644924a3d2acdea464e9282e429b1acc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release files / TracTicketMSTeamsDispatcher-0.7.0.dev0-py3-none-any.whl

Download URL TracTicketMSTeamsDispatcher-0.7.0.dev0-py3-none-any.whl
Size 31.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76f875be9a467c9a6d76b5a8e55f13500e3da034d7a0589542ab5f6f9fba16b2
BLAKE2b-256 checksum
How to use checksums
192fb77e32aaa940b1cead54cdb7c8c61a1494607de3ceaf3fba00718c1459b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Security for TracTicketMSTeamsDispatcher 0.7.0.dev0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page