Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Aug 16, 2020
1 parent db9b8b7 commit 45cd287
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In repositories with a lot of activity, the workflow queue will get backed up ve

Dispatching commands to be processed elsewhere keeps the workflow queue moving quickly. It essentially enables parallel processing of workflows.

A additional benefit of dispatching is that it allows non-sensitive workloads to be run in public repositories to save using private repository GitHub Action minutes.
An additional benefit of dispatching is that it allows non-sensitive workloads to be run in public repositories to save using private repository GitHub Action minutes.

<div align="center"><img src="docs/assets/slash-command-dispatch.png" width="550"></div>

Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
build-docs
```
Note that not specifying the `repository` input will mean that dispatch events are created in the *current* repository by default. It's perfectly fine to use the current repository and not dispatch events to a seperate "processor" repository.
Note that not specifying the `repository` input will mean that dispatch events are created in the *current* repository by default. It's perfectly fine to use the current repository and not dispatch events to a separate "processor" repository.

This action also features [advanced configuration](docs/advanced-configuration.md) that allows each command to be configured individually if necessary. Use the standard configuration shown above unless you require advanced features.

Expand Down Expand Up @@ -169,7 +169,7 @@ Commands are dispatched with a payload containing a number of contexts.
#### `slash_command` context

The slash command context contains the command and any arguments that were supplied by the user.
It will also contain any static arguments, if configured.
It will also contain any static arguments if configured.

To demonstrate, take the following configuration as an example.
```yml
Expand Down
6 changes: 3 additions & 3 deletions docs/advanced-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## What is advanced configuration?

Due to the limitations of yaml based action inputs, basic configuration is not adequate enough to support unique configuration *per command*.
Due to the limitations of YAML based action inputs, basic configuration is not adequate to support unique configuration *per command*.

For example, the following basic configuration means that all commands must have the same `admin` permission.

Expand All @@ -22,7 +22,7 @@ To solve this issue, advanced JSON configuration allows each command to be confi
## Dispatching commands
There are two ways to specify JSON configuration for command dispatch. Directly in the workflow via the `config` input, OR, specifing a JSON config file via the `config-from-file` input.
There are two ways to specify JSON configuration for command dispatch. Directly in the workflow via the `config` input, OR, specifying a JSON config file via the `config-from-file` input.

**Note**: It is recommended to write the JSON configuration directly in the workflow rather than use a file. Using the `config-from-file` input will be slightly slower due to requiring the repository to be checked out with `actions/checkout` so the file can be accessed.

Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:

## Advanced action inputs

Advanced configuration requires a combination of yaml based inputs and JSON configuration.
Advanced configuration requires a combination of YAML based inputs and JSON configuration.

| Input | JSON Property | Description | Default |
| --- | --- | --- | --- |
Expand Down
4 changes: 2 additions & 2 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## Use case: Execute command using a specific repository branch

This is pattern for a slash command where a named argument specifies the branch to checkout. If the named argument is missing it defaults to `master`. For example, the following command will cause the command workflow to checkout the `develop` branch of the repository where the command was dispatched from. After the branch has been checked out in the command workflow, scripts, tools or actions may be executed against it.
This is a pattern for a slash command where a named argument specifies the branch to checkout. If the named argument is missing it defaults to `master`. For example, the following command will cause the command workflow to checkout the `develop` branch of the repository where the command was dispatched from. After the branch has been checked out in the command workflow, scripts, tools or actions may be executed against it.

```
/do-something branch=develop
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
## Use case: Execute command to modify a pull request branch
This is pattern for a slash command used in pull request comments. It checks out the pull request branch and allows further scripts, tools and action steps to modify it.
This is a pattern for a slash command used in pull request comments. It checks out the pull request branch and allows further scripts, tools and action steps to modify it.
```
/fix-pr
Expand Down
2 changes: 1 addition & 1 deletion docs/updating.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
/send "hello world!"
```

- The `commands` input can now be newline separated, or comma separated.
- The `commands` input can now be newline separated, or comma-separated.

e.g.
```yml
Expand Down

0 comments on commit 45cd287

Please sign in to comment.