From 464b7e32c9229b8225ca20998759622c7fbce1b5 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Thu, 23 Jul 2020 11:04:37 +0900 Subject: [PATCH] Update documentation --- docs/updating.md | 55 ++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/docs/updating.md b/docs/updating.md index c8f769e..8735c99 100644 --- a/docs/updating.md +++ b/docs/updating.md @@ -4,25 +4,24 @@ - The format of the `slash_command` context has been changed to prevent an issue where named arguments can overwrite other properties of the payload. - The following is an example of the new `slash_command` context. The slash command `/deploy branch=master env=prod some other args` will be converted to a JSON payload as follows. + The following is an example of the new `slash_command` context. The slash command `/deploy branch=master smoke-test dry-run reason="new feature"` will be converted to a JSON payload as follows. ```json - "slash_command": { - "command": "deploy", - "args": { - "all": "branch=master env=prod some other args", - "unnamed": { - "all": "some other args", - "arg1": "some", - "arg2": "other", - "arg3": "args" - }, - "named": { - "branch": "master", - "env": "prod" - }, - } - } + "slash_command": { + "command": "deploy", + "args": { + "all": "branch=master smoke-test dry-run reason=\"new feature\"", + "unnamed": { + "all": "smoke-test dry-run", + "arg1": "smoke-test", + "arg2": "dry-run" + }, + "named": { + "branch": "master", + "reason": "new feature" + }, + } + } ``` - The `named-args` input (standard configuration) and `named_args` JSON property (advanced configuration) have been removed. Named arguments will now always be parsed and added to the `slash_command` context. @@ -31,15 +30,8 @@ ### New features -- The `commands` input can now be newline separated, or comma separated. - - e.g. - ```yml - commands: | - deploy - integration-test - build-docs - ``` +- Commands can now be dispatched via the new [workflow_dispatch](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) event. For standard configuration, set the new `dispatch-type` input to `workflow`. For advanced configuration, set the `dispatch_type` JSON property of a command to `workflow`. + There are significant differences in the action's behaviour when using `workflow` dispatch. See [workflow dispatch](workflow-dispatch.md) for usage details. - Added a new input `static-args` (standard configuration), and a new JSON property `static_args` (advanced configuration). This is a list of arguments that will always be dispatched with commands. @@ -67,5 +59,12 @@ /send "hello world!" ``` -- Commands can now be dispatched via the new [workflow_dispatch](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) event. For standard configuration, set the new `dispatch-type` input to `workflow`. For advanced configuration, set the `dispatch_type` JSON property of a command to `workflow`. - There are significant differences in the action's behaviour when using `workflow` dispatch. See [workflow dispatch](workflow-dispatch.md) for usage details. +- The `commands` input can now be newline separated, or comma separated. + + e.g. + ```yml + commands: | + deploy + integration-test + build-docs + ```