Update documentation
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 |
|
||||
| --- | --- | --- | --- |
|
||||
|
||||
+2
-2
@@ -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
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user