Skip to content

Commit

Permalink
Merge pull request #7 from skrenek/master
Browse files Browse the repository at this point in the history
Fixed ls command.  command now uses v3 of github api.
  • Loading branch information
ryedin committed Jun 21, 2012
2 parents ffddf73 + 8f86027 commit 8398c0e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ var padRight = function(str, len) {
};

https.get({
host: 'github.com',
host: 'api.github.com',
port: 443,
path: '/api/v2/json/repos/show/theVolary/feather/tags'
path: '/repos/theVolary/feather/tags'
}, function(res) {
var tagDataBuf = "";
res.setEncoding('utf8');
Expand All @@ -46,8 +46,9 @@ https.get({
res.on('end', function( ) {
var tagData = JSON.parse(tagDataBuf);
var tags = [];
for (var tag in tagData.tags) {
tags.push(tag);
var i = 0;
for (i = 0; i < tagData.length; i++) {
tags.push(tagData[i].name);
}
tags.sort();
var width = getMaxTagNameLength(tags);
Expand Down

0 comments on commit 8398c0e

Please sign in to comment.