{"id":18764799,"url":"https://github.com/bugzilla/github-discord-relay","last_synced_at":"2025-07-21T10:04:15.252Z","repository":{"id":167842901,"uuid":"643470925","full_name":"bugzilla/github-discord-relay","owner":"bugzilla","description":"Filter repositories when sending organization-wide webhooks to Discord from GitHub","archived":false,"fork":false,"pushed_at":"2023-08-24T18:13:48.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-19T10:24:15.270Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugzilla.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":"2023-05-21T09:13:02.000Z","updated_at":"2024-09-08T05:39:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"3f507ec0-5476-47be-8d10-54f64cf43876","html_url":"https://github.com/bugzilla/github-discord-relay","commit_stats":null,"previous_names":["bugzilla/github-discord-relay"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bugzilla/github-discord-relay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugzilla%2Fgithub-discord-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugzilla%2Fgithub-discord-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugzilla%2Fgithub-discord-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugzilla%2Fgithub-discord-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugzilla","download_url":"https://codeload.github.com/bugzilla/github-discord-relay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugzilla%2Fgithub-discord-relay/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266278321,"owners_count":23904039,"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":[],"created_at":"2024-11-07T18:31:36.351Z","updated_at":"2025-07-21T10:04:15.229Z","avatar_url":"https://github.com/bugzilla.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Discord Relay\n\nThis is an app that can be set as a target for outgoing GitHub webhooks, and can in turn relay those webhook requests to a Discord incoming webhook.\n\nGitHub can already send directly to Discord, but the problem lies when you set up an organization-wide webhook on Discord, and have dozens or more repositories, and want to specify a specific list of repos to include or ignore. Because GitHub itself doesn't have that capability yet. (See [this feature request for GitHub](https://github.com/orgs/community/discussions/36180))\n\nSo this is basically a dumb relay, except that it can filter the repositories.\n\n## Installation\n\nThis app is designed to run under mod_wsgi on Apache HTTPd, and requires Python 3.8 or newer.\n\nThis app has python dependencies, and requires a virtualenv to be set up for it.\n\n* `cd` into the directory containing the app\n* `virtualenv venv`\n* `source venv/bin/activate`\n* `pip install -r requirements.txt`\n\nNote that the version of python installed in the virtualenv needs to match the one that mod_wsgi was compiled for.\n\nPlace the following in the VirtualHost block for the VirtualHost that will host your app:\n\n``` httpconf\n    SetEnv gh2discord_config /path/to/gh2discord_config.json\n    WSGIDaemonProcess gh2discord python-home=/path/to/github-discord-relay/venv\n    WSGIScriptAlias /github /path/to/github-discord-relay/app.wsgi process-group=gh2discord application-group=%{GLOBAL}\n    \u003cDirectory /path/to/github-discord-relay\u003e\n        Order allow,deny\n        Allow from all\n    \u003c/Directory\u003e\n```\n\nYou can put the config file wherever you want, as long as you update the SetEnv line above to match where you put it.\n\nThe WSGIScriptAlias line above points the /github path after the domain to point at the app. If it's the only thing you have on the domain, you can just leave it as / . Or change it to whatever path you want.\n\n## Config file format\n\nExample config:\n``` json\n{\n  \"webhooks\": {\n    \"{webhook id}\": {\n      \"destination_webhook\": \"https://discord.com/api/webhooks/{random webhook code}/github\",\n      \"include_repositories\": [\n        \"user/repo_name1\",\n        \"user/repo_name2\"\n      ],\n      \"exclude_repositories\": [\n        \"user/repo_name3\",\n        \"user/repo_name4\"\n      ]\n    }\n  }\n}\n```\n\n`webhook_id` should be a UUID or similar. It's basically pretty arbitrary. Whatever you use for this would be placed after the url to your app deployment. For example, if your WSGIScriptAlias points at `/webhooks` then your webhook URL that you put in the config on GitHub for thr webhook will be: `https://my.server.tld/webhooks/{webhook_id}`\n\n`destination_webhook` needs to be the full URL assigned to the webhook by Discord when you set it up in the Discord config, followed by `/github`.\n\n`include_repositories` and `exclude_repositories` are mutually exclusive. You should only use one or the other. If you do provide both for some reason, then `exclude_repositories` will be ignored. Both are a simple list of repositories. Since you can theoretically point more than one organization at the same webhook ID, you need to include the username in front of the repo name.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugzilla%2Fgithub-discord-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugzilla%2Fgithub-discord-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugzilla%2Fgithub-discord-relay/lists"}