mailing list friend
add git repo init instructions to readme
git push after applying
add #[serde(default)] to approval-related config


browse  log 



You can also use your local clone with git send-email.


Patchy is an email bot that aids software maintenance. It was born out of some opinions:

  • maintenance work on a mailing list is smooth until you have to apply patches, at which point you better get ready to copy and paste! unless you already invested time in some arcane custom scripts, it's tedious.
  • we are wasting our subject lines! there is no reason for them all to say the same thing! we can do better.
  • mailing lists are too unstructured. you can't glance at a patchset and see whether it was applied, for example, and I believe this is daunting for new users

#What does it do

Patchy keeps track of reviews and approvals and can be told to apply a patchset via email if certain conditions are met.

Patchy assumes mails follow a certain structure, and builds its features on top of this. It recognises the following message types by their subject line:

Type Meaning Valid in reply to
Review Raise a question/comment about the patchset Patch
Resolve Close a review Review
Approve Indicate that you want the patchset to be applied Patch
Apply Instruct Patchy to apply the patchset Patch

Subject lines must be of the form $type: ... (where ... can be anything you want) to be recognised. Patchy also recognises patches as formatted by git-send-email.

For Patchy to apply a patchset, the set must have no open reviews and at least required_approvals approvals from approvers. These values are specified in the config file as described below.

If an Apply fails due to these constraints, Patchy will reply to it and explain. If the Apply succeeds, Patchy will reply with the resulting commit info from git log --oneline.


Patchy is not yet able to initialise a git repository for itself, so you must clone your repository to the configured location manually. Make sure that git push succeeds when run under the same user account as Patchy, perhaps by ensuring that the user's SSH keys have the correct permissions.

patchy [<config-path>]

If the config path is not specified, ./patchy.toml is assumed.


Patchy's configuration uses TOML.

# Path to the git repository managed by Patchy.
repo = "/home/patchy/patchy"
# Path to Patchy's maildir, where it picks up and processes incoming mails.
maildir = "/var/spool/mail/patchy"
# Outgoing address for Patchy's responses.
list_address = "~roseh/patchy-devel@lists.sr.ht"
# The identity to use in Patchy's responses.
self_identity = "Patchy <patchy@krx.sh>"
# sendmail(-compatible) command for sending responses.
sendmail = ["msmtp", "-C", "/home/patchy/msmtp.conf"]

# List of email addresses whose approvals count towards the required_approvals check.
# If this is empty, every approval counts.
approvers = ["rose@krx.sh", "someone.else@gmail.com"]
# Number of approvals required from different people before a patchset can be applied.
required_approvals = 1
# List of email addresses permitted to apply patchsets. Must be present and non-empty.
committers = ["rose@krx.sh", "someone.else@gmail.com"]