This is a prototype for the Hubot commands proposal.
module.exports = robot => {
const cli = require('hubot-commands')(robot)
cli.command('cowsay <words...>', (res, words) => {
res.send(require('cowsay').say(words.join(' ')))
})
.description('make the cow say words')
.alias('c')
}
TODO:
- explicit args
- required:
deploy <branch>
- optional:
deploy <branch> [environment]
- Variadic:
deploy <branch> [hosts...]
- coercion & regex for advanced syntax
- default values
- required:
- subcommands:
deploy list
- alias
- automated help
- listener metadata