https://github.com/tchajed/commit-email-bot
GitHub app that sends an email with every commit diff
https://github.com/tchajed/commit-email-bot
git
Last synced: 4 months ago
JSON representation
GitHub app that sends an email with every commit diff
- Host: GitHub
- URL: https://github.com/tchajed/commit-email-bot
- Owner: tchajed
- License: mit
- Created: 2024-09-29T18:13:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-11T18:20:10.000Z (6 months ago)
- Last Synced: 2026-01-11T21:46:31.790Z (6 months ago)
- Topics: git
- Language: Go
- Homepage: https://commit-emails.xyz
- Size: 154 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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](https://github.com/apps/commit-emails)
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)
```toml
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](https://github.com/davidlazar/git-mailbot).