Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Does anyone know of a way to have github email commit/pull request notifications including the full diff of the commit?

I know about the email service hook, but that doesn't send the diff.

share|improve this question
    
You might want to chime in on github.com/github/github-services/issues/149 - the service hooks don't even get the diff –  Alex Dupuy Jan 13 '12 at 10:09
    
Don't hold your breath, though, github.com/github/github-services/issues/86 was closed in April, so it seems unlikely they will do anything with issue 149 either. –  Alex Dupuy Jan 13 '12 at 10:13
    
This question was answered (in the negative, mostly) at stackoverflow.com/questions/4211107/… –  Alex Dupuy Jan 13 '12 at 10:14
    
@Alex - Would you like to post your comment as an answer to help move this question off the front page of unanswered questions? –  Shannon Wagner Jun 14 '12 at 1:40
    
@ShannonWagner - so posted. I even came up with a way to make it all happen, using local resources and other tools, but the instructions are only a rough outline, and making it happen would require scripting, assembly and batteries not included. –  Alex Dupuy Jun 15 '12 at 14:33
add comment

1 Answer 1

At this time, there is no way to do what you want using just GitHub. As noted in http://stackoverflow.com/questions/4211107/how-to-get-email-diffs-for-github-pushes, there is no support within GitHub to send e-mails including diffs. There are two GitHub issues raised asking about this - http://github.com/github/github-services/issues/86 (closed) and http://github.com/github/github-services/issues/149 but although they say this is something they might implement in the future, there is no indication this will happen.

That said, if you are willing to run your own (local or cloud hosted, but with scripting) web or e-mail server with git repository, you could build this yourself using GitHub post-receive notifications (http://help.github.com/articles/post-receive-hooks) sent to your web server, or normal (without diffs) e-mail notifications sent to a special address on your e-mail server. The choice between web and e-mail notification would be made depending on where & how you are hosting your server - if you have good connectivity & reliability, web notifications will have lowest latency, but if your web-server is unreachable for any reason, you won't get a notification until the next commit that is made while your web-server is reachable; using e-mail will delay the whole process, but might be preferable if you are hosting this at home, and especially for any machine that is not always on.

In either case, you would have to write a script that takes the (e-mail or web/JSON) notification and pulls the relevant repo(s) from GitHub to a local repository, where you would have to set up Git's internal post-receive hook mechanism to run something like http://github.com/jtek/git-hook-update-notify-email (mentioned in the above stackoverflow article) or if you're willing & able to install & use Pygments (Python code colorizer) perhaps something nicer looking like http://blog.chomperstomp.com/making-git-show-post-receive-e-mails-as-an-html-color-formatted-diff/ (linked to/from http://stackoverflow.com/questions/3232270/git-post-receive-email-hook-to-show-an-html-formatted-color-diff/).

It's a bit of scripting work, and requires that you have some hosting infrastructure to run the web or e-mail server, the local-pull script, and then the local post-receive hook to generate the actual e-mail with diffs, but it should be possible to set this up in less than a day.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.