{"id":20040366,"url":"https://github.com/cvitter/mattermost-jira-bridge","last_synced_at":"2026-05-14T22:41:47.602Z","repository":{"id":150376555,"uuid":"139289431","full_name":"cvitter/mattermost-jira-bridge","owner":"cvitter","description":"Flask application that serves as a bridge between JIRA and Mattermost.","archived":false,"fork":false,"pushed_at":"2019-03-12T12:40:20.000Z","size":40,"stargazers_count":1,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-12T19:15:32.094Z","etag":null,"topics":["flask","jira","mattermost","python","webhooks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cvitter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-01T00:27:14.000Z","updated_at":"2019-03-11T14:49:53.000Z","dependencies_parsed_at":"2023-07-27T18:04:07.562Z","dependency_job_id":null,"html_url":"https://github.com/cvitter/mattermost-jira-bridge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvitter%2Fmattermost-jira-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvitter%2Fmattermost-jira-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvitter%2Fmattermost-jira-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvitter%2Fmattermost-jira-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cvitter","download_url":"https://codeload.github.com/cvitter/mattermost-jira-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241470320,"owners_count":19968041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","jira","mattermost","python","webhooks"],"created_at":"2024-11-13T10:41:47.293Z","updated_at":"2026-05-14T22:41:47.574Z","avatar_url":"https://github.com/cvitter.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JIRA Webhook Bridge for Mattermost\n\nThis repository contains a Python Flask application that accepts webhooks from [JIRA\nServer](https://www.atlassian.com/software/jira) and forwards them to the specified\nchannel, or channels, in a [Mattermost](https://mattermost.com) server via an incoming webhook.\nYou can configure the application to post to channels based on JIRA projects and issue type\nas described below in the **Configuration** section.\n\nCurrently the application supports the following JIRA event types:\n\n* Project Created\n* Issue Created\n* Issue Edited\n* Issue Commented\n* Issue Comment - Edited\n* Issue Comment - Deleted\n\n \n **Import Notes**:\n * This application has only been tested with JIRA Server 7.9.2. \n * This application was written extremely quickly and could use additional work in the form of refactoring, the addition of error handling, and testing (including on different versions of JIRA). Please feel free to jump in and help with pull requests, issues, etc.\n * This application is an example of how to bridge JIRA webhooks to Mattermost and is not \n meant to be used in a production environment.\n\n# Installation, Configuration, and Execution\n\nThe following section describes how to install, configure and run the Flask application.\n\n## Installation\n\nThe easiest way to install this application is to:\n\n1. Log into the machine that will host the Python Flask application;\n2. Clone this repository to your machine: `git clone https://github.com/cvitter/mattermost-jira-bridge.git`;\n3. Create a webhook in Mattermost to accept posts from JIRA (**Note**: You will need the URL for\nthis webhook when configuring the application below.)\n\n## Configuration\n\nOnce the application has been cloned it needs to be configured for your environment and\nhow your organization uses JIRA. The following instructions cover configuration:\n\n1. Change directories to the application's root: `cd mattermost-jira-bridge`;\n2. Make a copy of `config.sample` as `config.json`: `cp config.sample config.json`\n3. Open the `config.json` file using your favorite editor (e.g. `sudo nano config.json`) and make the\nedits to each section as described below:\n\n**Application**\n\nThe `application` section setups up the runtime environment of the Flask application. For most uses\nyou can leave this as-is or simply update the port to the desired port for your environment.\n\n```\n\t\"application\" : {\n\t\t\"host\" : \"0.0.0.0\",\n\t\t\"port\" : 5007,\n\t\t\"debug\" : false\n\t}\n```\n\nIf you do not want the Flask application to be accessible from other machines you can \nupdate the host address to `127.0.0.1`. You can also enable Flask's debug mode by \nchanging `debug` to `true`.\n\n**Features**\n\nThe `features` section allows you to configure how messages map to Mattermost channels based \non JIRA project and whether or not the issue is labeled as a bug. The channel mapping has\nthe following options:\n\n* All messages are sent to the default channel configured in the Mattermost webhook;\n* Messages are mapped to Mattermost channels based on mappings in the `projects.json` file;\n* Messages are mapped to Mattermost channels based on a naming pattern configured in the \n`project_to_channel_pattern` setting.\n\nSpecific configuration settings are described in more detail below.\n\n```\n\t\"features\" : {\n\t\t\"use_project_to_channel_map\" : true,\n\t\t\"use_project_bugs_to_channel_map\" : true,\n\t\t\"use_project_to_channel_pattern\" : true,\n\t\t\"project_to_channel_pattern\" : \"jira-\", \n\t\t\"use_bug_specific_channel\" : false,\n\t\t\"bug_channel_postfix\" : \"-bugs\",\n\t\t\"use_attachments\" : true\n\t}\n```\n\n* `use_project_to_channel_map` - when set to `true` the application will check the `projects.json`\nfile and select the Mattermost channel based on the JIRA Project Key. In the example file\nbelow the `PRJX` project key would map to the `prjx-jira' channel in Mattermost.\n\n```\n{\n\t\"projects\" : {\n    \t\t\"prjx\": \"prjx-jira\",\n    \t\t\"prjx-bug\": \"prjx-jira-bugs\",\n    \t\t\"prjz\": \"prjz-jira\"\n\t}\n}\n```\n\n**Note**: In the example above the `prjx-jira` channel is named `PRJX: JIRA`. Mattermost converted \nthe channel name to `prjx-jira` for the channel URL by replacing spaces with `-` and removing \nspecial characters. When specifying the channel to send messages to you need to use this\nmodified URL friendly format. If you need to find the correct format you can select `View Info` \nfor the channel in Mattermost and select the channel portion of the URL, e.g.:\n`https://mymattermostserver.com/myteam/channels/prjx-jira`.\n\n**Important Note**: If no channel is specified Mattermost will post the message into the default\nchannel configured in the webhook. If a channel _is_ specified but does not exist in\nMattermost the message will not post in Mattermost.\n\n* `use_project_bugs_to_channel_map` - when set to true the application will check the `projects.json`\nfile when the issue type equals `bug` and select the Mattermost channel based on the JIRA Project \nKey with `-bug` appended to it. In the example above a bug submitted in the PRJX project\nwould be mapped as `prjx-bug` and the corresponding message would be posted to the \n`prjx-jira-bugs` channel.\n\n* `use_project_to_channel_pattern` - when set to `true` the application will prepend the value found\nin the `project_to_channel_pattern` field to the project key to generate the channel name to post\nthe message to. \n\n**Note**:  This setting will work if both `use_project_to_channel_map` and \n`use_project_bugs_to_channel_map` are set to `true`. In scenarios where the project key being tested \ndoes not have a match in the `projects.json` folder the application will try and match the message \nto a folder based on the `project_to_channel_pattern` field.\n\n**Important Note**: Once `use_project_to_channel_pattern` is set to `true` the application will try to\nsend all messages to channels based on the `project_to_channel_pattern` (if the channel name isn't\ncreated using the Project to Channel Mapping). If the channel doesn't exist in Mattermost the\nmessage will not post. \n \n* `project_to_channel_pattern` - the string to prepend to the project key to generate a channel name\nto post a message to.\n\n* `use_bug_specific_channel` - when set to `true` the application will append the `bug_channel_postfix` value\nto the channel name. \n\n* `bug_channel_postfix` - The value appended to the channel name if `use_bug_specific_channel` is set \nto `true`. The default value is `-bugs`.\n\n* `use_attachments` - when set to `true` the application sends messages in the Mattermost \n[Message Attachment](https://docs.mattermost.com/developer/message-attachments.html) format. When\nset to `false` messages will be sent as plain text (with Markdown support).\n\n\n**Colors**\n\nThe `colors` section has one setting, `attachment`,  which sets the highlight color\nof the message if sent as a \n[Message Attachment](https://docs.mattermost.com/developer/message-attachments.html).\n**Note**: The default color that the application ships with is green.\n\n```\n\t\"colors\" : {\n\t\t\"attachment\" : \"#28c12b\"\n\t}\n```\n\n**Mattermost**\n\nThe `mattermost` section is used to configure the Mattermost web hook that the application\nwill post messages to. You can optionally add a user name and icon to override the \ndefault configured in Mattermost.\n\n```\n\t\"mattermost\" : {\n\t\t\"webhook\" : \"https://mattermost.url/hooks/webhookid\",\n\t\t\"post_user_name\" : \"JIRA\",\n\t\t\"post_user_icon\" : \"\"\n\t}\n```\n\n**JIRA**\n\nThe `jira` section has one setting for the base URL of your JIRA server. This setting is used\nto generate links in messages the application posts to Mattermost.\n\n```\n\t\"jira\" : {\n\t\t\"url\" : \"http://jira.url:8080/\"\n\t}\n```\n\n### JIRA Webhook\n\nThe following steps describe how to setup the JIRA webhook:\n\n1. Select `System` from the `Administration` menu (**Note**: You must have administrative rights.)\n2. Click on `WebHooks` in the `Advanced` section.\n3. Click on the `Create a WebHook` button at the top right of the page.\n4. Fill in the `New WebHook Listener` form:\n    * Enter a name for your webhook;\n    * Click on `Enabled` for `Status` to ensure that the webhook fires;\n    * Enter your the address of your running bridge application and append `/${project.key}` to the end \n      (example:` https://bridge.url/jira/${project.key}`) so that JIRA will pass\n      the project key via the URL to bridge application.\n    * Select the events that you want to send from JIRA to Mattermost (**Note**: only the\n      events listed in the introduction above are currently supported however unsupported\n      events will not cause application failures.)\n5. Click on the `Create` button to finish creating the webhook.\n\n\n## Execution\n\nOnce the application is configured that are a number of ways to run it. The simplest for \ntesting purposes is:\n\n`sudo python jira.py`\n\nFor longer term execution I use the following command that runs the application headlessly \nand captures output into a log file for troubleshooting:\n\n```\nsudo python jira.py \u003e\u003e jira.log 2\u003e\u00261 \u0026\n```\n\n\n# Make this Project Better (Questions, Feedback, Pull Requests Etc.)\n\n**Help!** If you like this project and want to make it even more awesome please contribute your ideas,\ncode, etc.\n\nIf you have any questions, feedback, suggestions, etc. please submit them via issues here: https://github.com/cvitter/mattermost-jira-bridge/issues\n\nIf you find errors please feel to submit pull requests. Any help in improving this resource is appreciated!\n\n# License\nThe content in this repository is Open Source material released under the MIT License. Please see the [LICENSE](LICENSE) file for full license details.\n\n# Disclaimer\n\nThe code in this repository is not sponsored or supported by Mattermost, Inc.\n\n# Authors\n* Author: [Craig Vitter](https://github.com/cvitter)\n\n# Contributors \n\nPlease submit Issues and/or Pull Requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvitter%2Fmattermost-jira-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvitter%2Fmattermost-jira-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvitter%2Fmattermost-jira-bridge/lists"}