commit-emails-bot

command module
v0.0.0-...-34172c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2024 License: MIT Imports: 26 Imported by: 0

README

GitHub commit-email-bot

commit-email-bot sends emails when changes are pushed to a Git repository on Github.

Getting started

Install the commit-emails GitHub app

In your repo, commit a file called .github/commit-emails.toml that specifies the recipients and the format of the emails (the default is html, text is also supported)

to = "alice@example.com,bob@example.net"

[email]
format = "html"

Every email from commit-email-bot contains the string jD27HVpTX3tELRBjcpGsK6io7 followed by the name of the repo. You can use this to easily filter commit emails in Gmail.

Deploying

Use dotenvx run -f .env.keys -- docker compose up --build. (You need the private key in .env.keys to access the secrets in .env.production.)

A 512MB virtual machine runs out of memory when building, but not when running, so make sure to configure some swap space.

Future work

  • Expose a branch filter option (simplifying the set of git_multimail options).
  • Clean up old cloned repos to free up space.
  • Use the GitHub API to fetch diffs and format them using pygments or shiki. This would avoid cloning the repo (the major source of state) and remove the dependency on git_multimail.py, as well as enable other features.
    • Add syntax highlight within diffs
    • Improve the linking to GitHub
    • Allow filtering emails based on file path
  • Upgrade to a paid Mailgun account to support a wider audience.

Acknowledgment

Based on David's git-mailbot.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL