hubot | A customizable life embetterment robot | Bot library
kandi X-RAY | hubot Summary
kandi X-RAY | hubot Summary
Hubot is a framework to build chat bots, modeled after GitHub's Campfire bot of the same name, hubot. He's pretty cool. He's extendable with scripts and can work on many different chat services. This repository provides a library that's distributed by npm that you use for building your own bots. See the documentation for details on getting up and running with your very own robot friend. In most cases, you'll probably never have to hack on this repo directly if you are building your own bot. But if you do, check out CONTRIBUTING.md. If you'd like to chat with Hubot users and developers, join us on Slack.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hubot
hubot Key Features
hubot Examples and Code Snippets
# curl -is \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"description":"my first publish endpoint",
"type": "zabbix",
"tags":["alerts", "env:prod"]
}' \
http://localhost:7000/endpoint
HTTP/1.1 20
module.exports = (robot) ->
config = require('hubot-conf')('example', robot)
robot.respond /hello/, (msg) ->
# read the 'response.hello' property for the package 'example'
#
# it could be set by someone running something like
brew install icu4c
bin/hubot
[Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading adapter shell
[Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading scripts from /home/tomb/Development/hubot/scripts
[Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading scripts from /home/t
Community Discussions
Trending Discussions on hubot
QUESTION
GitHub's API has an endpoint to request reviewers for a pull request. Reviewers can be individual users (reviewers
) or entire teams (team_reviewers
) (teams can be created at the org level).
For instance, the following will request a PR review from Stack Overflow's SRE
team:
ANSWER
Answered 2020-Nov-23 at 22:29Unlike the API, the CLI doesn't have a separate parameter. --reviewer
just accepts team names in the format org/teamname
as well. For example:
QUESTION
I have installed helm
on a GKE Cluster
. Installation is fine
ANSWER
Answered 2020-Jul-08 at 17:02Use helm hub to search for any chart such as nginx and you can use the command given there to install the chart. Please note
Not all charts are available in
stable
repoYou need to update local helm repo to be able to install the chart.
helm repo update
helm install stable/nginx-ingress
QUESTION
I am trying to integrate Hubot with Slack and followed the steps as mentioned here, however I am not getting any connectivity message. There is no error as well. What could have caused this behavior?
...ANSWER
Answered 2019-Jun-04 at 14:25Hey I think you missed API token key in the run command. The command should be.
QUESTION
I'm writing a test for my Hubot (which acts as a Slack bot). Triggered by certain Slack messages, the bot sends an HTTP POST request to a separate Rails app. How can I check in my test script that the HTTP request has been sent? My guess was that I should check the contents of the robot.logger
(please let me know if there's a better way) - but if so, how can I access the log in the test?
Hubot script (basically, it informs the Rails app about a user who is leaving the office to take a break):
...ANSWER
Answered 2019-May-09 at 07:54I wouldn't advise writing tests depending on logs. The log is a side-effect of the program. If you change the log output, the tests will fail, even though the functionality is still correct.
Instead you should use a library to mock out and check if the http request was performed. Actually making the request would be a side-effect, and again shouldn't be done in your tests (what if you cause excessive load on an external service due to tests running?
You are already using the nock
library to catch the request. It can also be used to check if the request was made (see the expectations docs from the nock repo).
Here is an example using the requestScope.done()
from nock in your test.
QUESTION
I am developing a Slack bot (using Hubot) as well as a Rails app that will receive HTTP requests from it and process them accordingly. Basically, the high-level steps of what I want to do are like this:
- A slack user sends a trigger word to the bot (let's say the trigger is "bye").
- Hubot picks up the trigger, then sends a request to the Rails app.
- Rails app marks the Slack user as out of office.
I seem to have some sort of routing issue, because I get the EHOSTUNREACH
error when I try to execute this flow with both apps booted (rails s
for Rails and ./bin/hubot --adapter slack
for Hubot). I'm guessing that Hubot is unable to reach the Rails app at all.
Am I missing something here? What URL do I need to use to enable these apps to send requests to each other?
I've also tried swapping out the 127.0.0.1:3000
with localhost:3000
, but the results stayed the same.
Hubot code
...ANSWER
Answered 2019-May-07 at 08:14Change the request to robot.http("http://localhost:3000")
ensuring you have the protocol at the beginning.
QUESTION
I'm writing a simple test for my Hubot (which acts as a Slack bot) to check that my bot sends a reply in response to triggers. I've followed the example shown in the docs, but test results in an AssertionError
(details below) and I'm not sure why. Any advice would be greatly appreciated.
I assume the issue has to do with the test, not the script (break-start.coffee
), since I got the correct reply when I tested the script by sending an actual message to the bot from Slack.
ANSWER
Answered 2019-May-07 at 11:36I think the problem is an indentation error.
The @room.user.say
call is being passed an empty function as a promise resolution rather than the expect block, as this should be indented another level.
That fits with the result that only one message is in the room, as the expect
call got executed before the async @room.user.say()
got executed:
QUESTION
I'm currently trying to build a slack bot using Hubot and I need to persist some things on Redis. I'm using the following script from https://github.com/hubotio/hubot-redis-brain
...ANSWER
Answered 2019-Feb-27 at 20:52Seems like you can have no code changes but set the environment variable REDIS_URL
to the URL for your Redis instance.
QUESTION
I have the following script:
...ANSWER
Answered 2019-Jan-10 at 14:03You are getting multiple messages because the robot.respond /dog (.*)/i
listener is attached every time the robot.respond /petsit/i
is called. That is the first time you send petsit the /dog (.*)/i
listener is attached for the first time. When you send dog ... only one response will be triggered. Every subsequent time you send petsit the second listener will bind itself on the same robot instance, thus sending you multiple responses.
By default there is no native support from Hubot for managing conversations. Instead you should have a look at a 3rd party module like hubot-conversation that adds this type of functionality or implement your own logic.
QUESTION
The hubot
type definitions have the following class:
ANSWER
Answered 2018-Nov-16 at 22:01hubot.d.ts
should contain:
QUESTION
I've created FormData
object created like that:
ANSWER
Answered 2018-Oct-24 at 10:29Try with this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install hubot
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page