|
|
|
@ -110,21 +110,31 @@ if(id){
|
|
|
|
|
case '2': {
|
|
|
|
|
const
|
|
|
|
|
{
|
|
|
|
|
status,
|
|
|
|
|
data: {
|
|
|
|
|
deletionCode
|
|
|
|
|
} = {}
|
|
|
|
|
} = await client.delete(
|
|
|
|
|
`/repo/${id}`,
|
|
|
|
|
{
|
|
|
|
|
validateStatus: status => [202, 204].includes(status)
|
|
|
|
|
}
|
|
|
|
|
} = await client.delete(`/repo/${id}`),
|
|
|
|
|
hash = prompt(outdent `
|
|
|
|
|
);
|
|
|
|
|
if(status === 202){
|
|
|
|
|
const hash = prompt(outdent `
|
|
|
|
|
Deletion code: ${deletionCode}
|
|
|
|
|
Push a commit which message ends with it.
|
|
|
|
|
Hash >
|
|
|
|
|
`);
|
|
|
|
|
if(await validateAction({
|
|
|
|
|
action: 'delete',
|
|
|
|
|
id,
|
|
|
|
|
hash
|
|
|
|
|
})) console.log('[✓] Success');
|
|
|
|
|
else console.error('[!] Validation failed');
|
|
|
|
|
if(await validateAction({
|
|
|
|
|
action: 'delete',
|
|
|
|
|
id,
|
|
|
|
|
hash
|
|
|
|
|
})) console.log('[✓] Success');
|
|
|
|
|
else console.error('[!] Validation failed');
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
console.log('[✓] Success');
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
default: {
|
|
|
|
|