[Checkins] Better Github commit emails

Marius Gedminas marius at gedmin.as
Mon Feb 25 07:01:02 UTC 2013


I'm not very happy with the commit emails we get from Github:

* the From field doesn't show the author's name, all we get to see is an
  uninformative "Github"
* there's no inline diff
* multiple commits are squashed into a single email

We can't get better emails from Github: "We're not adding this at this
time" -- https://github.com/github/github-services/pull/275

But Zope Foundation has mirrors of the Github repositories (right?).  If
the mirrors are updated frequently enough (is once every 5 minutes
practical?), we could have our own post-receive hooks that use a better
commit email script.

https://github.com/git-commit-notifier/git-commit-notifier is not bad:

  gem install git-commit-notifier
    # I wish there was a tool written in Python, not Ruby, but oh well
  vim /path/to/git-commit-notifier.yml
    # create a new file based on
    # https://github.com/git-commit-notifier/git-commit-notifier/blob/master/config/git-notifier-config.example.yml
    subject: "[${repo_name}${slash_branch_name}] ${message} [${description}]"
    mailinglist: checkins at zope.org
  vim /path/to/git/repo/hooks/post-receive
    #!/bin/sh
    git-commit-notifier /path/to/git-commit-notifier.yml
  chmod +x /path/to/git/repo/hooks/post-receive

The cron script that mirrors repositories can ensure such a hook exists
for newly-created ones.

Marius Gedminas
-- 
This message has been ROT-13 encrypted twice for higher security.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://mail.zope.org/pipermail/checkins/attachments/20130225/18a61e55/attachment.sig>


More information about the checkins mailing list