Skip to content

Instantly share code, notes, and snippets.

@gr2m
Last active December 27, 2015 10:09
Show Gist options
  • Save gr2m/7309560 to your computer and use it in GitHub Desktop.
Save gr2m/7309560 to your computer and use it in GitHub Desktop.
get all commits from one GitHub organization using jQuery
var org = 'hoodiehq';
var sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString();
$.getJSON('https://api.github.com/orgs/'+org+'/events').then( function(events) {
var commits = [];
events.forEach( function(ev){
if (ev.created_at < sevenDaysAgo) return;
if (ev.type !== 'PushEvent' || ! ev.payload.commits) return;
ev.payload.commits.forEach( function(commit) {
commits.push(commit.author.name + ': ' + commit.message.split(/\n/)[0])
})
});
console.log(commits.join('\n'))
} )
Alex Feyerke: Built sponsoring change
Atul Varma: Remove empty parenthesis.
Jan Lehnardt: Merge pull request #37 from toolness/gh-pages
Alex Feyerke: Built sponsoring change
Atul Varma: minor typo fixes to index.html.
Jan Lehnardt: Merge pull request #36 from toolness/gh-pages
Alex Feyerke: Built another sponsoring change
Jan Lehnardt: 1k
Alex Feyerke: Built sponsoring change
Jan Lehnardt: human js
Sven Lito: [fix] remove unnecessary semicolon
Sven Lito: [test] adds more tests
Sven Lito: [feature] adds verbose flag to install/uninstall commands
Sven Lito: fixing tests
Sven Lito: update verbose branch
Sven Lito: [fix] make tests pass
Sven Lito: [minor] remove reference to old hoodie-app directory
Sven Lito: [minor] readme tweaks
Sven Lito: Merge branch 'dev' of https://github.com/hoodiehq/hoodie-cli into dev
@svnlto
Copy link

svnlto commented Nov 4, 2013

nice one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment