At Wehkamp we believe in enabling teams to automate their work. Lately we’ve been experimenting with GitHub’s Hubot project to build chat-bots for Slack. It has been quite a ride! What did we build? A lot! Bots took control of…
For our bot-zero project, we’ve decided to go all in on dev containers. What’s not to love? You can basically ship a development environment complete with node 22 and all the Visual Studio Code extensions we need. And if you…
…const robot = new Robot(mockAdapter as any, false, botName, botAlias) robot.loadAdapter().then(() => { // create a user const user = robot.brain.userForId(“1”, { name: settings?.testUserName || “mocha”, room: “#mocha” }) const context = new TestBotContext(robot as unknown as Robot, user) done(context)…
…we use it to alter the message, otherwise we let Hubot Grafana have the original message. Here is the code: import { Bot } from “hubot-grafana/src/Bot” function parseGrafanaSlugs(robot: Hubot.Robot) { if (!robot) throw “Argument ‘robot’ is empty.” const bot =…
…on for while… We’ve mitigated this by checking if the sender of a certain message is a bot or not. Do you want to know more about our Hubot? Read Jump-starting Slack bot projects: bot-zero. Changelog 2022-08-18 😳 Many typos….
…receive middleware that use the UpdatableMessage to inject a loading message: import { createUpdatableMessage } from “../common/UpdatableMessage” function rewriteGrafanaCommands(robot: Hubot.Robot) { if (!robot) throw “Argument ‘robot’ is empty.” robot.receiveMiddleware(async context => { const listeners = (<any>robot).listeners const listener = listeners.find(l…
…micro-site with two the UA’s and discover the difference. UA_Chrome=”Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36″; UA_AdsBot=“AdsBot-Google (+http://www.google.com/adsbot.html)”; URL=”sea/C21/1AI/D01/?v=3.1&NavState=/_/N-1xv8Zmpk&kind=Regenlaars+(Dames)”; # Cloudflare visit “https://www.wehkamp.nl/$URL” “$UA_Chrome”; visit “https://www.wehkamp.nl/$URL” “$UA_AdsBot”; # main gateway visit “https://gateway.wehkamp.internal/$URL” “$UA_Chrome”; visit “https://gateway.wehkamp.internal/$URL”…