1.0.1 • Published 5 years ago

mutate-github-repositories-cli v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

mutate-github-repositories-cli

CLI to run a custom script on one or multiple repositories

Usage

$ mutate-github-repositories [script] [repos...]

Positionals:
  script  Path to your *.js script
  repos   One or multiple arrays in the form of 'repo-owner/repo-name'
                                                                   [default: []]

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]
  --token    Requires the "public_repo" scope for public repositories, "repo"
             scope for private repositories.                 [string] [required]
  --cache    Cache responses for debugging            [boolean] [default: false]

The script must export a default function which takes three parameters:

module.exports = exampleScript;

module.exports = async function myScript(octokit, repository, options) {
  // do something here
};

Example

$ npx mutate-github-repositories-cli \
  --token 0123456789012345678901234567890123456789 \
  example.js \
  octokit/*

See example.js for the syntax of a script.

License

ISC