All open issues on my github repositories

I wrote a quick little script that turns all my open github issues onto clickable links..

Copy paste the below into githubIssues.js:

// Edit me
var username = "YOURUSERNAME";
var password = "YOURPASSWORD";
// stop Editing!

var gittub = require("node-github");
var github = new gittub({version: "3.0.0"});

github.authenticate({
  type: "basic",
  username: username,
  password: password
});

github.issues.getAll({
  user: "JohnMcLear",
  filter: "subscribed",
  per_page: 100,
  sort: "created",
  direction: "asc"
}, function(err, res) {
  for(var issueKey in res){
    var issue = res[issueKey];
    var line = "<p class='issue'>";
    line += issue.created_at + " ";
    if(issue.repository) line += issue.repository.full_name + " ";
    line += "<a target='_blank' href='"+issue.html_url+"'>";
    line += issue.title+"</a>";
    line += "</p>";
    if(issue.title) console.log(line);
  }
});

Edit your username and password then type:

npm install node-github

then:

node githubIssues.js &gt; issues.html

Open issues.html in your web browser..

Limitations: Max 100 issues due to Github API limit.

Leave a Reply

Your email address will not be published. Required fields are marked *