Created
June 22, 2012 19:21
-
-
Save blakmatrix/2974610 to your computer and use it in GitHub Desktop.
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
var client = github.client({ | |
username: username, | |
password: password | |
}); | |
var endpoint = '/repos/' + username + '/' + repo; | |
client.del(endpoint, function (err, status, body) { | |
if (err) { | |
return cb(err); | |
} | |
if (status === 204) { //Status: 204 No Content | |
app.log.info('Succesfully deleted ' + endpoint.blue); | |
return cb(null, 'OK'); | |
} | |
}); |
var client = github.client({
username: username,
password: password
});
var endpoint = '/repos/' + username + '/' + repo;
client.del(endpoint, {}, function (err, status, body) {
if (err) {
return cb(err);
}
if (status === 204) { //Status: 204 No Content
app.log.info('Succesfully deleted ' + endpoint.blue);
return cb(null, 'OK');
}
});
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/home/blakmatrix/projects/node-migrator-bot/node_modules/octonode/lib/octonode/client.js:72
return callback(new Error(body.message));
^
TypeError: undefined is not a function
at Client.errorHandle (/home/blakmatrix/projects/node-migrator-bot/node_modules/octonode/lib/octonode/client.js:72:16)
at Request._callback (/home/blakmatrix/projects/node-migrator-bot/node_modules/octonode/lib/octonode/client.js:137:22)
at Request.callback (/home/blakmatrix/projects/node-migrator-bot/node_modules/request/main.js:119:22)
at Request. (native)
at Request.emit (events.js:70:17)
at Request. (/home/blakmatrix/projects/node-migrator-bot/node_modules/request/main.js:521:16)
at Request.emit (events.js:67:17)
at IncomingMessage. (/home/blakmatrix/projects/node-migrator-bot/node_modules/request/main.js:483:14)
at IncomingMessage.emit (events.js:88:20)
at HTTPParser.parserOnMessageComplete as onMessageComplete