Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Jan 4, 2020
1 parent 4921e18 commit f1c0b59
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ jobs:
commands: rebase, integration-test, create-ticket
```
This action also features [advanced configuration](docs/advanced-configuration.md) that allows each command to be configured individually if necessary. Use the standard configuration above unless you require advanced features.
### Action inputs
| Input | Description | Default |
| --- | --- | --- |
| `token` | (**required**) A `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). | |
| `reaction-token` | `GITHUB_TOKEN` or a `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). | |
| `reactions` | Add reactions. :eyes: = seen, :rocket: = dispatched | `true` |
| `commands` | (**required**) Input: A comma separated list of commands to dispatch. JSON property: A single command. | |
| `commands` | (**required**) A comma separated list of commands. | |
| `permission` | The repository permission level required by the user to dispatch commands. (`none`, `read`, `write`, `admin`) | `write` |
| `issue-type` | The issue type required for commands. (`issue`, `pull-request`, `both`) | `both` |
| `allow-edits` | Allow edited comments to trigger command dispatches. | `false` |
Expand All @@ -65,8 +67,6 @@ jobs:
| `config` | | JSON configuration for commands. See [Advanced configuration](docs/advanced-configuration.md) | |
| `config-from-file` | | JSON configuration from a file for commands. See [Advanced configuration](docs/advanced-configuration.md) | |

This action also features [advanced configuration](docs/advanced-configuration.md) that allows each command to be configured individually if necessary.

### What is the reaction-token?

If you don't specify a token for `reaction-token` it will use the [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) supplied via `token`.
Expand Down Expand Up @@ -121,16 +121,16 @@ If the `named-args` input is set to `true`, any arguments that are prefixed in t
For example, the slash command `/deploy branch=master env=prod some other args` will be set in the JSON payload as follows.

```json
{
"command": "deploy",
"args": "branch=master env=prod some other args",
"unnamed_args": "some other args",
"branch": "master",
"env": "prod",
"arg1": "some",
"arg2": "other",
"arg3": "args"
}
"slash_command": {
"command": "deploy",
"args": "branch=master env=prod some other args",
"unnamed_args": "some other args",
"branch": "master",
"env": "prod",
"arg1": "some",
"arg2": "other",
"arg3": "args"
}
```

These named arguments can be accessed in a workflow as follows.
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
reactions:
description: 'Add reactions to comments containing commands.'
commands:
description: 'A comma separated list of commands to dispatch.'
description: 'A comma separated list of commands.'
required: true
permission:
description: 'The repository permission level required by the user to dispatch commands.'
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Advanced configuration requires a combination of yaml based inputs and JSON conf
| `token` | | (**required**) A `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). | |
| `reaction-token` | | `GITHUB_TOKEN` or a `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). | |
| `reactions` | | Add reactions. :eyes: = seen, :rocket: = dispatched | `true` |
| | `command` | (**required**) Input: A comma separated list of commands to dispatch. JSON property: A single command. | |
| | `command` | (**required**) The slash command. | |
| | `permission` | The repository permission level required by the user to dispatch commands. (`none`, `read`, `write`, `admin`) | `write` |
| | `issue_type` | The issue type required for commands. (`issue`, `pull-request`, `both`) | `both` |
| | `allow_edits` | Allow edited comments to trigger command dispatches. | `false` |
Expand Down

0 comments on commit f1c0b59

Please sign in to comment.