Skip to content

Instantly share code, notes, and snippets.

@blakmatrix
Created June 22, 2012 19:21
Show Gist options
  • Save blakmatrix/2974610 to your computer and use it in GitHub Desktop.
Save blakmatrix/2974610 to your computer and use it in GitHub Desktop.
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');
}
});
@pksunkara
Copy link

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