Ou converse com a gente depois da talk
Slack: bit.ly/nodeschool-campinas
Palestrar: bit.ly/nodeschool-manda-talks
Seja mentor: bit.ly/nodeschool-seja-mentor
• 18:30 às 19:00 - Conversas iniciais e apresentação
• 19:00 às 20:00 - Talk: ChatOps e ChatBots com Hubot
• 20:00 às 20:30 - Coffee, troca de idéias e micos em público
• 20:30 às 22:00 - Workshops
Para iniciantes
Para quem quer se aprofundar
$ whoami
Victor Perin
me@victorperin.ninja
Essa palestra vai de apresentar conceitos, por isso não iremos nos aprofundar muito.
AceBot.ai
SlackBot
Hubot
DevOps não é ferramenta,
é uma cultura!
se fala NewBot
Multiplataforma!!
PS: todos são pacotes do NPM
module.exports = (robot) => {
robot.hear(/badger/i, res =>
res.send("Badgers? BADGERS? WE DON'T NEED NO STINKIN BADGERS")
);
robot.respond(/open the pod bay doors/i, res =>
res.reply("I'm afraid I can't let you do that.")
);
robot.hear(/I like pie/i, res =>
res.emote("makes a freshly baked pie")
);
robot.respond(/open the (.*) doors/i, res => {
doorType = res.match[1];
if(doorType == "pod bay")
res.reply("I'm afraid I can't let you do that.");
else
res.reply("Opening #{doorType} doors");
});
robot
.http("https://midnight-train")
.get( (err, res, body) => {
// sua lógica aqui
});
robot.router.post('/hubot/chatsecrets/:room', (req, res) => {
const room = req.params.room;
const data = req.body.payload ? JSON.parse(req.body.payload) : req.body;
const secret = data.secret;
robot.messageRoom(room, "I have a secret: #{secret}");
res.send 'OK';
});
};
$ npm install -g yo generator-hubot
$ mkdir meuhubot
$ cd meuhubot
$ yo hubot
$ npm install
$ export VARIAVEIS_DO_SEU_ADAPTOR=huehue
$ ./bin/hubot --adaptor={seu adaptor} --name={nome do seu bot, dentro do seu chat}
$ npm install
$ export HUBOT_SLACK_TOKEN=xoxb-YOUR-TOKEN-HERE
$ ./bin/hubot --adapter slack --name robo_tope
me@victorperin.ninja
ou no slack do NodeSchool Campinas