Skip to content

Instantly share code, notes, and snippets.

@mhayashi
Created March 10, 2011 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhayashi/863689 to your computer and use it in GitHub Desktop.
Save mhayashi/863689 to your computer and use it in GitHub Desktop.
get github issues with node
var GitHubApi = require("github").GitHubApi
, user = 'joyent'
, repo = 'node'
, status = 'open'
;
var github = new GitHubApi(true);
github.getIssueApi().getList(user, repo, status, function(err, issues) {
console.log(issues.length + ' issues');
issues.sort(function(a, b) {
return a.updated_at > b.updated_at;
});
issues.forEach(function(i) {
console.log('\n' + i.title);
console.log(' https://github.com/' + user + '/' + repo + '/issues/' + i.number);
console.log(' ' + i.comments + ' comments' + ' created at '+i.created_at + ' by ' + i.user);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment