Skip to content

Commit

Permalink
tags.js now uses Github api v3. Fixes ls command.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Krenek committed Jun 21, 2012
1 parent aa22007 commit 8f86027
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 8f86027

Please sign in to comment.