@@ -74,7 +74,7 @@ app.commands.repo = function repo(link, cb) {
74
74
75
75
app . commands . delrepo = function delRepo ( repo , cb ) {
76
76
this . log . info ( 'Attempting to open delete "' + username + '/' + repo + '"' ) ;
77
- deleteRepo ( repo , 'OK ' , cb ) ;
77
+ deleteRepo ( repo , 'DONE ' , cb ) ;
78
78
} ;
79
79
80
80
app . commands . db = function db ( cb ) {
@@ -245,7 +245,7 @@ function forkAndFix(link, cb) {
245
245
function ( status , callback ) {
246
246
submitPullRequest ( link , username , user , repo , status , callback ) ;
247
247
} , // submit pull request
248
- function ( repo , status , callback ) {
248
+ function ( status , callback ) {
249
249
deleteRepo ( repo , status , callback ) ;
250
250
} , // delete forked repo if there is not a pull request to make
251
251
function ( status , callback ) {
@@ -623,14 +623,14 @@ function deleteRepo(repo, status, cb) {
623
623
client . del ( endpoint , { } , function ( err , status , body ) {
624
624
if ( err ) {
625
625
app . log . error ( 'Could not delete ' + endpoint . blue + ' : ' + body ) ;
626
- // return cb({message: err + ' ' + endpoint});
626
+ return cb ( { message : err + ' ' + endpoint } ) ;
627
627
}
628
628
if ( status === 204 ) { //Status: 204 No Content
629
629
app . log . info ( 'Succesfully deleted ' + endpoint . blue ) ;
630
630
return cb ( null , 'OK' ) ;
631
631
} else {
632
632
app . log . error ( 'Could not delete ' + endpoint . blue + ' : ' + body ) ;
633
- return cb ( { message : endpoint + ' ' + body } ) ;
633
+ return cb ( null , { message : endpoint + ' ' + body } ) ;
634
634
}
635
635
} ) ;
636
636
} else {
0 commit comments