42

We're are using GitHub Enterprise in our company. We have a “develop” branch where every programmer must push their work. Is there a way to get notified when someone pushes into the develop branch along with a link to a diff view, like the one you get for a pull request?

zoul
  • 102,279
  • 44
  • 260
  • 354
Andreas Köberle
  • 106,652
  • 57
  • 273
  • 297

3 Answers3

36

Not quite - but close enough. (You'll get notified for every commit, not push.)

For GitHub Enterprise as of mid 2014:

  1. Go into your repository's Settings
  2. Open the "Webhooks and Services" tab
  3. Click "Add Service" button
  4. Select "Email" from the long list of services
  5. Put in an e-mail address. This can be an e-mail address that forwards to multiple e-mail addresses, or just your own if only one person/account needs e-mail notifications.
  6. Check "Send From Author" (probably) and "Active" (definitely).

For older versions of GitHub Enterprise:

  1. Go into your repository's Settings
  2. Open the "Service Hooks" tab
  3. Select "Email" from the long list of services
  4. Put in an e-mail address. This can be an e-mail address that forwards to multiple e-mail addresses, or just your own if only one person/account needs e-mail notifications.
  5. Check "Send From Author" (probably) and "Active" (definitely).

Done!

Update GitHub plans on shutting down GitHub services before the end of the year. Refer

V Reddy
  • 38
  • 1
  • 5
Ry-
  • 218,210
  • 55
  • 464
  • 476
  • 4
    Is there a way of doing this without being an admin on the repo? – selig Aug 30 '14 at 11:01
  • 1
    @selig apparently not, which makes it close to useless if you have a bunch of people with various permission levels each of whom wants to be sent mail to their own address for certain repositories. You would have to set up a separate mailing list for every repository, then manually synchronize subscribe permissions to each list with read permissions for the corresponding repository, and each person would have to subscribe or unsubscribe according to their personal watch status on that repository (or similar preference). Yuck! – Jesse Glick Sep 02 '14 at 16:35
  • This answer is now outdated. Any solution for the current version? – vefthym Aug 04 '16 at 14:58
  • [Update 2019](https://developer.github.com/changes/2018-04-25-github-services-deprecation/#deprecation-timeline): notifications by email are available in the [new notifications](https://help.github.com/en/github/managing-subscriptions-and-notifications-on-github/configuring-notifications), currently in beta release (not available for everyone) – user2314737 Nov 23 '19 at 09:45
  • This is now available under settings -> notifications, in 2021: https://docs.github.com/en/github/administering-a-repository/about-email-notifications-for-pushes-to-your-repository – Andrew Feb 26 '21 at 20:09
1

How about using IFTT or Zapier

AhmadAssaf
  • 3,556
  • 5
  • 31
  • 42
1

Disclaimer: I'm the original author.

This project allows you to get an e-mail when a commit gets pushed on a repository you are watching (on any branch).

Explaination: gicowa is a command-line tool written in python that lists all last commits on all GitHub repos you are watching. This tool can send its output via e-mail and can be called from your crontab. Doing that makes you receive an e-mail notification each time a commit gets pushed on a GitHub repo you are watching.

Aurélien
  • 1,742
  • 1
  • 19
  • 30