mutate-github-repositories-cli

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i mutate-github-repositories-cli

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

14.4 kB

Total Files

11

Last publish

Collaborators

  • gr2m