1.0.0 • Published 8 years ago

fork-me v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

fork-me PayPal Version Downloads Get help on Codementor

Delete multiple GitHub repositories.

:cloud: Installation

$ npm i --save fork-me

:clipboard: 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);
});

:memo: 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.
     

:yum: How to contribute

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

:scroll: License

MIT © Ionică Bizău

1.0.0

8 years ago