Skip to content
This repository has been archived by the owner on Mar 4, 2023. It is now read-only.

Commit

Permalink
delete them too
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Jun 5, 2020
1 parent 0616cd1 commit b335ac4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/index.js
Expand Up @@ -62,7 +62,6 @@ These are DESTRUCTIVE actions!
return;
}

this.log(`Modifying https://api.github.com/repos/${nwo} ...`);
try {
const data = { default_branch: "production" };
const options = {
Expand All @@ -80,6 +79,22 @@ These are DESTRUCTIVE actions!
return;
}

try {
const { stdout } = await execa("git", ["branch", "-D", "master"]);
console.log(stdout);
} catch (error) {
this.error(error);
return;
}

try {
const { stdout } = await execa("git", ["push", "origin", ":master"]);
console.log(stdout);
} catch (error) {
this.error(error);
return;
}

this.log(`All done! PS: GitHub, drop ICE 🤗`);
}
}
Expand Down

0 comments on commit b335ac4

Please sign in to comment.