Skip to content

Commit e66a659

Browse files
octoherd[bot]gr2m
andauthored
feat: all --octoherd-* flags are now optional (#4)
BREAKING CHANGE: Repositories can no longer be passed as positional argument, use the `--octoherd-repos` (or `-R`) CLI flag instead. Before: ``` npx @octoherd/script-add-octoherd-cli-to-script "@octokit/*" ``` After ``` npx @octoherd/script-add-octoherd-cli-to-script --octoherd-repos "@octokit/*" ``` Or do not set `--octoherd-repos` at all, in which case the user will be prompted. Co-authored-by: Gregor Martynus <[email protected]>
1 parent 0eea87e commit e66a659

File tree

4 files changed

+293
-1232
lines changed

4 files changed

+293
-1232
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,31 @@ This script is specific to the needs of a one-time migration for [@octoherd](htt
66

77
## Usage
88

9+
Minimal usage
10+
11+
```
12+
$ npx @octoherd/script-create-repositories-from-script-folders \
13+
--path-to-folders "scripts"
14+
```
15+
16+
Pass all options as CLI flags to avoid user prompts
17+
918
```
1019
$ npx @octoherd/script-create-repositories-from-script-folders \
11-
--octoherd-token 0123456789012345678901234567890123456789 \
12-
"octoherd/script-create-repositories-from-script-folders" \
13-
--path-to-folders "scripts/**"
20+
--path-to-folders "scripts" \
21+
-T ghp_0123456789abcdefghjklmnopqrstuvwxyzA \
22+
-R "octoherd/repository-with-script-folders"
1423
```
1524

25+
## Options
26+
27+
| option | type | description |
28+
| ---------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29+
| `--path-to-folders` | string | **Required.** Relative path to where the folders are located |
30+
| `--octoherd-token`, `-T` | string | A personal access token ([create](https://github.com/settings/tokens/new?scopes=repo)). Script will create one if option is not set |
31+
| `--octoherd-repos`, `-R` | array of strings | One or multiple space-separated repositories in the form of `repo-owner/repo-name`. `repo-owner/*` will find all repositories for one owner. `*` will find all repositories the user has access to. Will prompt for repositories if not set |
32+
| `--octoherd-bypass-confirms` | boolean | Bypass prompts to confirm mutating requests |
33+
1634
## License
1735

1836
[ISC](LICENSE.md)

0 commit comments

Comments
 (0)