Skip to content

Commit

Permalink
feat: all --octoherd-* flags are now optional (#4)
Browse files Browse the repository at this point in the history
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 <39992+gr2m@users.noreply.github.com>
Co-authored-by: Brian Douglas <bdougie@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 28, 2021
1 parent 949d485 commit f31a4da
Show file tree
Hide file tree
Showing 3 changed files with 217 additions and 3,454 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,31 @@

## Usage

Minimal usage

```js
npx octoherd-script-copy-labels \
--octoherd-token 0123456789012345678901234567890123456789 \
"bdougie/*" \
--template bdougie/live
```

Pass all options as CLI flags to avoid user prompts

```
npx octoherd-script-copy-labels \
--template bdougie/live \
--octoherd-bypass-confirms true // To bypass each label confirmation.
-T ghp_0123456789abcdefghjklmnopqrstuvwxyzA \
-R "bdougie/*"
--octoherd-bypass-confirms true // Optional to bypass each label confirmation.
```

## Options

| option | type | description |
| ------------ | ------ | --------------------------------------------------------------------- |
| `--template` | string | **(required)** this is the repo you want the labels to be copied from |
| option | type | description |
| ---------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--template` | string | **(required)** this is the repo you want the labels to be copied from |
| `--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 |
| `--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 |
| `--octoherd-bypass-confirms` | boolean | Bypass prompts to confirm mutating requests |

## Contributing

Expand Down
Loading

0 comments on commit f31a4da

Please sign in to comment.