Created
December 23, 2012 12:15
-
-
Save fracek/4363130 to your computer and use it in GitHub Desktop.
Save the current open issues for the given repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var github = require('octonode'); | |
function link_to(text, url) { | |
return '['+text+']('+url+')'; | |
} | |
var client = github.client(); | |
var repo_name = process.argv[2]; | |
var repo = client.repo(repo_name); | |
repo.issues(function(err, body, status) { | |
var issues_url = 'https://github.com/' + repo.name + '/issues/'; | |
console.log('# ' + link_to('Issues for '+ repo.name, issues_url) + '\n'); | |
for (i = 0; i < body.length; i++) { | |
var issue = body[i]; | |
console.log('## ' + link_to(issue.title, issue.html_url)); | |
console.log('_Opened by ' + issue.user.login + '_\n'); | |
console.log(issue.body); | |
} | |
}); | |
// vim: ft=javascript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment