{"id":30716987,"url":"https://github.com/dlzer/gojira","last_synced_at":"2025-09-03T08:30:05.630Z","repository":{"id":177000743,"uuid":"659834518","full_name":"DLzer/gojira","owner":"DLzer","description":"GoJira is an event distribution tool based around JIRA issue event communications","archived":false,"fork":false,"pushed_at":"2023-09-26T20:55:24.000Z","size":119,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T10:06:17.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DLzer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-06-28T16:57:48.000Z","updated_at":"2023-06-30T14:48:22.000Z","dependencies_parsed_at":"2024-06-21T17:55:40.284Z","dependency_job_id":"0ba4cbc1-a5e8-4ebc-8c96-a294ffb1a516","html_url":"https://github.com/DLzer/gojira","commit_stats":null,"previous_names":["dlzer/gojira"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/DLzer/gojira","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLzer%2Fgojira","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLzer%2Fgojira/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLzer%2Fgojira/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLzer%2Fgojira/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DLzer","download_url":"https://codeload.github.com/DLzer/gojira/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLzer%2Fgojira/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273413577,"owners_count":25101227,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-09-03T08:29:59.044Z","updated_at":"2025-09-03T08:30:05.593Z","avatar_url":"https://github.com/DLzer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoJira 🦖\n\n![Silly dinosaur with sunglasses](https://preview.redd.it/5j0lfvzx8c861.jpg?width=640\u0026crop=smart\u0026auto=webp\u0026s=6a0c5951ed2da6166d7a8a1d53269d7d3d8ad039)\n\nGoJira is a fully open source data distribution tool that connects JIRA webhooks to external services like GitHub, Discord, and Slack.\n\n## Quick Start ⚡\n\nYou can either download the binary relative to your operating system and fire that baby up, clone the repository and run it natively, or use docker to compose the app and it's extra goodies ( Prom, Jaeger, Redis, etc... )\n\n### Clone, Fork, Download the latest version\n\nThe project can be run in a variety of ways, with a large array of targets (OS, docker, system, etc..)\n\n### Configure mappings\n\nFor now the mapping for JIRA-\u003eDistribution is made from the `project_map.json` file at the project root. In the future this will be better handled via sql-lite or some other in-memory datastore.\n\nAdd your project mapping to the `project_map.json` file in the following format:\n```json\n[\n    {\n        \"ProjectKey\": [\n            \"ATEST\"\n        ],\n        \"GitHubRepositoryName\": \"test_repo_a\",\n        \"DiscordChannelID\": \"9902741758022972\"\n    },\n    {\n        \"ProjectKey\": [\n            \"BTEST\",\n            \"CTEST\"\n        ],\n        \"GitHubRepositoryName\": \"test_repo_b\",\n        \"DiscordChannelID\": \"599925012599\"\n    }\n]\n```\n\nThe latest version allows mapping multiple JIRA projects to singular output channels in the case you have something like a `#jira-updates` channel in Discord or Slack.\n\n### For Discord\n\nThis project is ran as a Discord bot using [DiscordGo](https://github.com/bwmarrin/discordgo), as such you will need a Discord Bot Token entered in the `config.yaml` as well as proper bot permissions for your Bot to actually run.\nThe first half of [this article](https://0x2142.com/how-to-discordgo-bot/) walks through the proper instructions on setting up a new bot and inviting it.\n\n### Run the project\n\nClone/fork this project and run it manually using the makefile\n\n```bash\nmake run\n```\n\n### Run with docker\n\nMake sure you have your local config file set up with your environment variables first. Then either use the makefile or a custom docker command to run the project.\n\nMakefile\n```bash\nmake develop\n```\n\nDocker\n```bash\ndocker-compose -f docker-compose.local.yml up --build\n```\n\n### Enable Discord Bot\n\nThe discord bot is run with [discordgo](https://github.com/bwmarrin/discordgo). To enable the bot to send messages in discord you will need a few things to get started. The first is setting up a bot in discord developer console which can be found [here](https://discord.com/developers). Create your bot, give it the proper permissions to send messages/embeds, copy the Bot Token, then invite it to your server(s). The bot token should be placed in the config under `discord: BotToken`. Enable the discord bot in the config then start/restart this application. The bot can be set up to filter all incoming webhook messages to one channel, or to split incoming messages into unique channels. \n\n## How it works 🔥\n\nJIRA is the staple of this project, and this was built for personal use for digesting my own JIRA data and effectively distributing it to systems that I currently use.\n\nSee JIRA WebHooks documentation for reference to payloads [here](https://developer.atlassian.com/server/jira/platform/webhooks/)\n\n### Receiving\n\nInitially JIRA will need to be set up to send data to this service. The endpoint that accepts the JIRA data is at `/v1/receiver/accept`. The incoming payload will be converted to a matching struct and the event types will be interpreted.\n\n### Interpreting\n\nJIRA has a handful of event action types that it can send. It's the interpreters job to parse these actions and create a simple yet concrete decision on what to do with the parsed actions. Once the event is interpreted and an `EventMap` is created its on to distribution.\n\n### Distribution\n\nThe distributor has arguably the biggest lift of them all. With payload body and event map in hand it's job is to send the data to where it needs to go. Based on configurations and mappings it will decide what, where, and how to send the data. As a quick example of a simple JIRA-\u003eGitHub communication the distributor will determine: Repository-\u003eIssue|Project-\u003eIssueType|ProjectTaskType-\u003eAssignee.\n\n## Telemetry 🌎\n\nOpenTelemtry is included in this project for distributed tracing. It's not absolutely necessary but in a world of integrations this is lightweight and can help seamlessly connect and trace this project when connected to others.\n\nExample usage:\n```go\nctx, span := otel.Tracer(\"Receiver\").Start(utils.GetRequestCtx(c), \"receiverHandlers.Accept\")\n\np := \u0026models.JiraWebhookMessage{}\nif err := c.Bind(p); err != nil {\n    utils.LogResponseError(c, h.logger, err)\n    span.End()\n    return c.JSON(httpErrors.ErrorResponse(err))\n}\n\nif err := h.receiverService.Accept(ctx, p); err != nil {\n    utils.LogResponseError(c, h.logger, err)\n    span.End()\n    return c.JSON(httpErrors.ErrorResponse(err))\n}\n```\n\nThe telemetry library used is `otel` for Go. You can read more about OpenTelemetry [here](https://opentelemetry.io/docs/what-is-opentelemetry/).\n\n## Observability 🔎\n\n### Pprof\nBy default this project comes with the ability to spin up a separate pprof endpoint at port `5555` for debugging and taking snapshots for application insights.\n\n### Prometheus\nBy default this project comes packed with middleware that exposes a `/metrics` endpoint and returns prometheus typed data. Additionally the docker compose file will also spin up a Prometheus container bound to ports `9101:9100`.\n\n### Grafana\nNot absolutely necessary but the docker compose will also spin up a Grafana container accessible at port `3000:3000` for use with exporting the prometheus/app metrics to create visible charts/graphs.\n\n### Jaeger\nOriginally I had included Jaeger in this build, and it still does have some remnants but with all the other observability baked in I didn't see it as absolutely necessary. If you plan on configuring this as a microservice or want to create a distributed system with this project build in Jaeger can quickly be added to the core service spin-up.\n\n### Thanks to:\n- Dan for the Idea!\n- Chantel for the support!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlzer%2Fgojira","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlzer%2Fgojira","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlzer%2Fgojira/lists"}