5.0.0 • Published 20 days ago

@octoherd/cli v5.0.0

Weekly downloads
6
License
ISC
Repository
github
Last release
20 days ago

Octoherd CLI

CLI to run a custom script on one or multiple repositories

Usage

Usage: octoherd run -S path/to/script.js [options]

Options:
      --help                      Show help                                            [boolean]
  -S, --octoherd-script           Path to *.js script. Must be an ES Module. [string] [required]
  -T, --octoherd-token            Requires the "public_repo" scope for public repositories, "rep
                                  o" scope for private repositories. Creates an OAuth token if n
                                  ot set.                                               [string]
  -R, --octoherd-repos            One or multiple repositories in the form of 'repo-owner/repo-n
                                  ame'. 'repo-owner/*' will find all repositories for one owner.
                                   '*' will find all repositories the user has access to.
                                  To exclude a repository use '!repo-owner/repo'. Will prompt
                                  for repositories if not set.                           [array]
      --octoherd-cache            Cache responses for debugging. Creates a ./cache folder if fla
                                  g is set. Override by passing custom path             [string]
      --octoherd-debug            Show debug logs                     [boolean] [default: false]
      --octoherd-bypass-confirms  Bypass prompts to confirm mutating requests
                                                                      [boolean] [default: false]
      --octoherd-base-url         When using with GitHub Enterprise Server, set to the root URL 
                                  of the API. For example, if your GitHub Enterprise Server's h
                                  ostname is github.acme-inc.com, then set to https://github.ac
                                  me-inc.com/api/v3.                                    [string]
      --version                   Show version number                                  [boolean]

Examples:
  octoherd run -S path/to/script.js                 Minimal usage example
  octoherd run -S path/to/script.js -T $TOKEN  -R   Pass token and repos as CLI flags
  octoherd/cli
  octoherd run -S path/to/script.js -T $TOKEN  -R   Avoid prompts for token and repos
  octoherd/cli
  octoherd run -S path/to/script.js -T $TOKEN  -R   Avoid any prompts
  octoherd/cli --octoherd-bypass-confirms
  octoherd run -S path/to/script.js -T $TOKEN  -R   Will fetch all repositories except repo-owner/hello-world
  'repo-owner/*' -R '!repo-owner/hello-world
  octoherd run -S path/to/script.js                 Run octoherd script against GHES
  --octoherd-base-url 
  https://github.acme-inc.com/api/v3

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

export async function script(octokit, repository, options) {
  // do something here
}

Examples

Similar projects

License

ISC

@everything-registry/sub-chunk-676@stoe/octoherd-dependabot-config@stoe/octoherd-script-replace-node-ci@stoe/octoherd-script-repo-settings@stoe/octoherd-script-security-analysis@stoe/octoherd-script-sync-labels@sdh100shaun/octaherd-rename-repos@infinitebrahmanuniverse/nolb-_ococtoherd-script-add-cache-to-node-github-actionoctoherd-script-add-or-delete-issue-labeloctoherd-script-bump-node-version-in-workflowsoctoherd-script-close-pull-requestsoctoherd-script-copy-labelsoctoherd-script-create-issue-templatesoctoherd-script-create-pr-templatesoctoherd-script-create-unique-issueoctoherd-script-fix-test-workflow-octokitoctoherd-script-get-filesoctoherd-script-hello-worldoctoherd-script-merge-pull-requestsoctoherd-script-migrate-pikaoctoherd-script-normalize-package-repository-fieldoctoherd-script-remove-renovate-package.jsonoctoherd-script-remove-topicsoctoherd-script-rename-labelsoctoherd-script-replace-all-repository-topicsoctoherd-script-set-pr-merge-configoctoherd-script-sync-repo-settingsoctoherd-script-unlabeloctoherd-script-update-action-version-in-workflowsoctoherd-script-use-pull-request-title-as-default-commit-messageoctoherd-script-validate-contributionoctoherd-script-validate-contribution-testoctoherd-script-validate-proctoherd-script-watch-unwatch-or-ignorestefanbuck-test-project@octoherd/script-rename-master-branch-to-main@octoherd/script-setup-renovate@octoherd/script-star-or-unstar@octoherd/script-sync-branch-protections@octoherd/script-add-octoherd-cli-to-script@octoherd/script-archive-repository@octoherd/script-close-renovate-dashboard-issues@octoherd/script-create-repositories-from-script-folders@octoherd/script-delete-repository@octoherd/script-find-releases@octoherd/script-hello-world@octoherd/script-remove-dependabot@octoherd/script-remove-required-ci-check
5.0.0

20 days ago

4.0.5

24 days ago

4.0.4

29 days ago

4.0.3

2 months ago

4.0.1

7 months ago

4.0.0

10 months ago

4.0.2

6 months ago

3.6.9

10 months ago

3.6.6

11 months ago

3.6.8

11 months ago

3.6.7

11 months ago

3.6.5

1 year ago

3.6.4

1 year ago

3.6.3

1 year ago

3.6.2

1 year ago

3.6.0

1 year ago

3.5.0

2 years ago

3.4.12

2 years ago

3.4.13

2 years ago

3.4.11

2 years ago

3.4.8

2 years ago

3.4.9

2 years ago

3.4.10

2 years ago

3.4.7

2 years ago

3.4.6

2 years ago

3.4.5

2 years ago

3.4.4

3 years ago

3.4.3

3 years ago

3.4.2

3 years ago

3.4.1

3 years ago

3.4.0

3 years ago

3.3.4

3 years ago

3.3.3

3 years ago

3.3.1

3 years ago

3.3.2

3 years ago

3.3.0

3 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.0

3 years ago

3.1.0-beta.1

3 years ago

3.1.0-beta.2

3 years ago

3.1.0-beta.3

3 years ago

2.8.0

3 years ago

2.7.4

3 years ago

2.7.5

3 years ago

2.7.3

3 years ago

2.7.0

3 years ago

2.6.1

3 years ago

2.7.2

3 years ago

2.7.1

3 years ago

2.5.0

3 years ago

2.6.0

3 years ago

2.4.0

3 years ago

2.3.0

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago