Skip to content

Releases: peter-evans/slash-command-dispatch

Slash Command Dispatch v2.1.0

02 Aug 08:09
bc81a15
Compare
Choose a tag to compare
  • Adds support for the repository permission levels triage and maintain. These levels are only applicable to organization repositories. See the documentation here for further details about permission levels.

Slash Command Dispatch v2.0.0

25 Jul 04:21
Compare
Choose a tag to compare

Breaking changes

  • 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 diff shows how the slash_command context has changed for the example command /deploy branch=master smoke-test dry-run reason="new feature".

      "slash_command": {
          "command": "deploy",
    -     "args": "branch=master smoke-test dry-run reason=\"new feature\"",
    -     "unnamed_args": "smoke-test dry-run",
    -     "arg1": "smoke-test",
    -     "arg2": "dry-run"
    -     "branch": "master",
    -     "reason": "new feature"
    +     "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.

  • The client_payload.github.payload.issue.body and client_payload.pull_request.body context properties will now be truncated if they exceed 1000 characters.

New features

  • Commands can now be dispatched via the new 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 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.

    Standard configuration:

            static-args: |
              production
              region=us-east-1

    Advanced configuration:

            "static_args": [
              "production",
              "region=us-east-1"
            ]
  • Slash command arguments can now be double-quoted to allow for argument values containing spaces.

    e.g.

    /deploy branch=master dry-run reason="new feature"
    
    /send "hello world!"
    
  • The commands input can now be newline separated, or comma separated.

    e.g.

            commands: |
              deploy
              integration-test
              build-docs

Slash Command Dispatch v1.2.0

02 Jun 06:53
ace7a19
Compare
Choose a tag to compare
  • Defaults reaction-token to the default GITHUB_TOKEN instead of the value of token. This is a minor, cosmetic behaviour change and should not be breaking. See reaction-token.

Slash Command Dispatch v1.1.3

02 May 01:23
25f1854
Compare
Choose a tag to compare

Slash Command Dispatch v1.1.2

09 Mar 08:39
Compare
Choose a tag to compare
  • Small fix to trim whitespace around the command on the first line

Slash Command Dispatch v1.1.1

03 Mar 10:41
Compare
Choose a tag to compare
  • Fixed an issue where newlines in comments prevented commands and arguments from being parsed correctly. As a result of the fix, any content in the comment after the first line is not considered part of the command.

Slash Command Dispatch v1.1.0

04 Jan 12:29
302daa7
Compare
Choose a tag to compare
  • Added named arguments feature. If the named-args input is set to true, any arguments that are prefixed in the format name=argument will be parsed and added to the payload. See here for further details.

Slash Command Dispatch v1.0.0

02 Dec 08:36
Compare
Choose a tag to compare