Skip to content

1.6.0: Toolkit#command

Compare
Choose a tag to compare
@release-drafter release-drafter released this 16 Mar 20:47

New feature

This release introduces Toolkit#command, a new method that will run the provided function when a matching slash-command is found. From the README:

Respond to a slash-command posted in a GitHub issue, comment, pull request, pull request review or commit comment. Arguments to the slash command are parsed by minimist. You can use a slash command in a larger comment, but the command must be at the start of the line:

Hey, let's deploy this!
/deploy --app example --container node:alpine
tools.command('deploy', async (args: ParsedArgs, match: RegExpExecArray) => {
  console.log(args)
  // -> { app: 'example', container: 'node:alpine' }
})

What鈥檚 Changed