fork-me

1.0.0 • Public • Published

fork-me PayPal Version Downloads Get help on Codementor

Delete multiple GitHub repositories.

☁️ Installation

$ npm i --save fork-me

📋 Example

const ghDelete = require("fork-me");

// Delete all the repositories owned by @ghost
ghDelete("ghost", "your token", (err, data) => {
    console.log(err || "Done");
}).on("repo-success", (data, repo) => {
    console.log(`Deleted ${repo.full_name}`);
}).on("repo-error", (err, data) => {
    console.log(`Failed to delete ${data.full_name}.`, err);
});

📝 Documentation

ghDelete(what, where, token, cb)

Deletes the specified repositories in a specified account.

Params

  • String what: If a GitHub owner (user or organization) is provided, all accesible repositories will be deleted. If a repository full name is provided, only that specific repository will be deleted.
  • String where: The account name where to fork the repositories (your username or an organization).
  • String token: The GitHub token.
  • Function cb: The callback function.

Return

  • EventEmitter An EventEmitter instance emitting the following events:
  • repo-error (err, repo): Emitted if the request failed for a specific repository.
  • repo-success (data, repo): Emitted the request is successful.
  • repo-progress (err, data): Emitted running the request to a repository (if it was a success, the error will be null).
  • done (err, data): Emitted after all the requests are executed.

😋 How to contribute

Have an idea? Found a bug? See how to contribute.

📜 License

MIT © Ionică Bizău

Readme

Keywords

Package Sidebar

Install

npm i fork-me

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • ionicabizau