Create CONTRIBUTING.md
This repository contains proof-of-concept-quality code to deploy a Slackbot with the capability to run OpenWhisk actions.
Copy src/main/resources/application.conf.template to src/main/resources/application.conf and fill in the credentials as indicated in the comments.
src/main/resources/application.conf.template
src/main/resources/application.conf
Run slack.whisk.Main.
slack.whisk.Main
You can run either from sbt directly, or use sbt eclipse to generate an Eclipse project and create a run configuration from there.
sbt
sbt eclipse
(Assuming your bot is called @whiskbot.)
@whiskbot
Send a run command either as a direct message, or using a mention in a channel where the bot was invited:
@whiskbot: please run this for me: ```function main(args) { return { "greeting": "Hello " + args.name + "!" }; }``` ```{ "name" : "visitor" }```
The message needs to contain the keywords “run”, “please”, and two triple-quoted blocks; one for the JavaScript code, and one for the action payload.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Slackbot for OpenWhisk
This repository contains proof-of-concept-quality code to deploy a Slackbot with the capability to run OpenWhisk actions.
Setup
Copy
src/main/resources/application.conf.templatetosrc/main/resources/application.confand fill in the credentials as indicated in the comments.Run
slack.whisk.Main.You can run either from
sbtdirectly, or usesbt eclipseto generate an Eclipse project and create a run configuration from there.Usage
(Assuming your bot is called
@whiskbot.)Send a run command either as a direct message, or using a mention in a channel where the bot was invited:
The message needs to contain the keywords “run”, “please”, and two triple-quoted blocks; one for the JavaScript code, and one for the action payload.
Caveat emptor