Skip to content

Files

Latest commit

4596210 · Feb 5, 2025

History

History
59 lines (42 loc) · 4.55 KB

README.md

File metadata and controls

59 lines (42 loc) · 4.55 KB

pydisgit

pydisgit is a port of the disgit tool to Python on a Quart/ASGI stack. As with the original, pydisgit is a webook proxy for sending GitHub messages to Discord that provides higher quality results than the built-in GitHub endpoint that Discord offers.

This additionally leaves it fully independent of the Cloudflare environment, and lets us use the (subjectively) superior and more reliable Python ecosystem.

usage

pydisgit is published as a Docker image ready to go under ghcr.io/kyoripowered/pydisgit:latest.

environment variables

pydisgit has the following optional environment variables that you can use to customize your instance:

  • PYDISGIT_IGNORED_BRANCHES_REGEX - A regex pattern for branches that should be ignored
  • PYDISGIT_IGNORED_BRANCHES - A comma separated list of branches that should be ignored
  • PYDISGIT_IGNORED_USERS - A comma separated list of users that should be ignored
  • PYDISGIT_IGNORED_PAYLOADS - A comma separated list of webhook events that should be ignored

deployment

Some example unit files for deployment under Podman Quadlet with systemd socket activation behind an Ngnix reverse proxy are provided in the [etc/deployment](etc/deployment) folder. By default, the docker image will bind to port 8000 if it's used on its own.

We recommend choosing a webhook secret to prevent unauthorized users from exhausting the host server's available ratelimit space.

contributing

We welcome contributions! You'll need Python 3.12 or newer in your environment, and the poetry dependency manager installed. We also recommend installing and enabling pre-commit to automatically resolve any formatting issues as you work on the project. We use the ruff linter for code style, you may benefit from one of its editor plugins.

licensing

pydisgit is released under the terms of the Apache Software License version 2.0. Thanks additionally go out to JRoy and all other contributors to upstream disgit for making it what it is today.

Supported Events

The following webhook events are supported as of now: