[Checkins] Better Github commit emails

Marius Gedminas marius at gedmin.as
Mon Feb 25 11:05:29 UTC 2013


On Mon, Feb 25, 2013 at 09:01:02AM +0200, Marius Gedminas wrote:
> 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}]"

Actually make that

      subject: "[${repo_name}${slash_branch_name}] ${description}: ${message}"

because it's nicer (and it matches the current message format)

>     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
-- 
Never trust a computer you can't repair yourself.
-------------- 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/87d4e7d8/attachment.sig>


More information about the checkins mailing list