49

I'd like to know what kind of commits are being made to the Lithium framework so I can update (or rollback) when there is something major.

I'm already watching the repository, but from what I've been able to find, that only shows updates on the github dashboard.

Bruno
  • 3
  • 5
ton.yeung
  • 4,793
  • 6
  • 41
  • 72
  • 2
    Crosslinking [this question](https://stackoverflow.com/q/9732779/241211) for people who only want notifications about changes to a _portion_ of the repo. – Michael Sep 08 '17 at 13:55

10 Answers10

43

Subscribe to Github's RSS feed!
Choose your news feed (all watched repos), or only Lithium's commit history.

RSS are made for that ;-)

PS: I don't see how can you find that useful since there is a couple of commits made each day on various branches, some small typo fixes, others fix bugs, and others introduce new things...

Mehdi Lahmam B.
  • 2,240
  • 16
  • 22
  • 2
    The typo and bug fixes aren't what concerns me. I'm building live sites and there have been instances of rollbacks, I find it important to keep up with how the repo is changing. – ton.yeung Mar 24 '12 at 04:23
  • 11
    It seems github doesn't put out an rss link. I think this might work though: https://github.com/UnionOfRAD/lithium/commits/master.atom. Found the answer on another question: http://stackoverflow.com/questions/7353538/seting-up-github-commit-rss-feed – ton.yeung Mar 24 '12 at 04:25
  • 6
    From the commits tab on Github, your can grab the feed. Master branch feed is a good candidate to follow changes – Mehdi Lahmam B. Mar 24 '12 at 04:27
  • If you're looking for push notifications (i.e. notifications on your phone or pc versus email notifications), you can check out my answer below https://stackoverflow.com/questions/9845655/how-do-i-get-notifications-for-commits-to-a-repository/62985885#62985885 – Joshua Wolff Jul 19 '20 at 21:30
23

I just found out by accident that you can easily manage to achieve this:

  • fork the project (if you haven't done it yet)
  • create a pull request for yourself from the selected branch, e.g. from master of head project to master of your fork:
    • base repository: your/project ; base: master <-- head repository: original/project ; compare: master
  • do NOT merge this pull request
  • under the Email section of your Notifications settings enable:
    • Comments on Issues and Pull Requests
    • Pull Request reviews
    • Pull Request pushes

That's it. You will receive email notifications about every commit on master branch.

Krisztian
  • 383
  • 3
  • 9
  • Not sure how this should work. I tried it and don't get any notifications. Do I have to do any thing more than [this](https://github.com/rubo77/gluon/pull/2)? – rubo77 May 16 '17 at 18:12
  • @rubo77, I've updated the solution with Notifications settings (otherwise your setup looks fine). – Krisztian May 18 '17 at 19:29
  • Ah ok, this is about email notifications. I thought the notifications in the top right corner with the blue bell have the same settings. I will try if I get email notifications now... – rubo77 May 18 '17 at 19:55
  • 1
    I think I get those too with this (but they disappear if you read your email). – Krisztian May 18 '17 at 20:12
  • 2
    You may need to drop the last commit. In 2021 I can't open a PR that has an empty diff: "There isn’t anything to compare." So I cloned the repository, `git reset HEAD~`, `git push --force`. And then I was able to create the PR as suggested in this answer. – Gunar Gessner Feb 18 '21 at 12:48
15

In addition to the other suggestions, you might try HubNotify for e-mail notifications.

Justin Workman
  • 688
  • 6
  • 12
  • 5
    This gives notifications for new tags, not new commits, according to their own description. – Aurélien Dec 14 '15 at 08:32
  • I added an answer for commits available here: https://stackoverflow.com/questions/9845655/how-do-i-get-notifications-for-commits-to-a-repository/62985885#62985885 – Joshua Wolff Jul 19 '20 at 21:28
13

Go to your github project -> Settings -> notifications.

Add any address you want to notify when commits are done.

gtamborero
  • 2,898
  • 27
  • 28
  • 6
    This only works if you have admin privileges for that repository (see https://help.github.com/en/articles/about-email-notifications-for-pushes-to-your-repository) – jkmartindale Jul 08 '19 at 19:41
10

You can leverage the GitHub Events API to perform such task and retrieve a JSON formatted response.

Note: In order to retrieve the commits, you'll have to filter out the events of type PushEvents.

Below a quick sample

$(function() {
    $.getJSON('https://api.github.com/repos/UnionOfRAD/lithium/events?callback=?', function(data) {
        var list = $('#push-events');

        $.each(data.data, function(key, val) {
            if (val.type == "PushEvent") {
                $.each(val.payload.commits, function(key2, val2) {
                    list.append('<li id="' + val2.sha + '"><a href="https://github.com/UnionOfRAD/lithium/commit/' + val2.sha + '">'
                                + val2.message + '</a> [' + val.actor.login + ' @ ' + val.created_at + ']</li>');
                });
            }
        });
        
        if (list.children().size() == 0) {
            list.append('<li>No pushes in last ' + data.data.length + ' events.</li>');
        }
    });
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<ul id="push-events"></ul>
Michael
  • 8,362
  • 6
  • 61
  • 88
nulltoken
  • 64,429
  • 20
  • 138
  • 130
  • 1
    so I'm guessing that there isn't an event or notification setting I can just check off? – ton.yeung Mar 24 '12 at 01:32
  • Unfortunately, there is no way to filter the events while invoking the API. This has to be performed as a post process step once the result is recieved. – nulltoken Mar 24 '12 at 09:12
6

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
2

You go into Settings > Integrations & services for the GitHub repository and add an Email service. See Choosing the types of notifications you receive.

user4028
  • 164
  • 1
  • 3
  • 1
    Services are being deprecated. https://developer.github.com/changes/2018-04-25-github-services-deprecation/ – Angus May 04 '18 at 12:56
  • 1
    Thanks for the deprecation info. An alternative to get an E-mail for seeing commits to repos one is watching is described in [this link](http://www.warski.org/blog/2013/04/per-commit-e-mail-github-notifications/) using the RSS feed from GitHub and IFTTT (setting up with OAuth if the repository is private) or one can of course use an RSS feed reader. – user4028 May 05 '18 at 17:48
1

I used Devhubapp, downloaded the desktop version and set notifications to my repositories and it works just fine! Maybe it can help users that find this topic recently.

Rhuan Barros
  • 171
  • 1
  • 6
0

You can use GitHub webhooks and set it up with a push notification API. This is free and easy to do.

Spontit is an example of a free API that enables you to do this.

For a tutorial, see this video.

Written instructions are available in the README here.

Joshua Wolff
  • 2,687
  • 1
  • 25
  • 42
0

You can use any more general website change monitoring tool to receive an email when a web page changes.

Make sure to monitor the url that lists the commits: https://github.com/*owner-name*/*repo-name*/commits/.

Alexander
  • 72
  • 7