Skip to content

Commit e35731e

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 0297704 commit e35731e

File tree

3 files changed

+289
-1230
lines changed

3 files changed

+289
-1230
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,27 @@
66

77
```
88
$ npx @octoherd/script-sync-branch-protections \
9-
--octoherd-token 0123456789012345678901234567890123456789 \
10-
"octoherd/*"\
119
--template "octoherd/cli"
1210
```
1311

12+
Pass all options as CLI flags to avoid user prompts
13+
14+
```
15+
$ npx @octoherd/script-sync-branch-protections \
16+
--template "octoherd/cli" \
17+
-T ghp_0123456789abcdefghjklmnopqrstuvwxyzA \
18+
-R "octoherd/repository-with-script-folders"
19+
```
20+
21+
## Options
22+
23+
| option | type | description |
24+
| ---------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25+
| `--template` | string | **Required.** Repository name from where to copy the branch protection settings. Example: `--template "octoherd/cli"` |
26+
| `--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 |
27+
| `--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 |
28+
| `--octoherd-bypass-confirms` | boolean | Bypass prompts to confirm mutating requests |
29+
1430
## License
1531

1632
[ISC](LICENSE.md)

0 commit comments

Comments
 (0)