问题标签 [hubot]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
670 浏览

node.js - Hubot/Express:在特定路由中禁用基本身份验证

我正在使用 Hubot,并且我已经定义了环境变量 EXPRESS_USER 和 EXPRESS_PASSWORD 来启用基本身份验证。Hubot 使用 express 基本上是

我想在不需要基本身份验证的脚本中公开一个 HTTP 命令。但是我无法更改 Hubot 中表示它正在初始化的代码

有谁知道是否可以在expressjs中做到这一点。

提前致谢

布鲁诺

0 投票
3 回答
1149 浏览

javascript - 让hubot响应多行消息

我有一个场景,我希望 hubot 解析一些东西。该命令将是hubot parse this thing <the content>

问题是,内容通常是一段粘贴的长文本,并且通常包含换行符(换行符)。这是我的正则表达式:

我能够得到很好的回应,但只有第一行内容被读入。有没有办法让他阅读整个粘贴的内容,包括所有行?

编辑:

添加 a+使其读取整个粘贴的内容,但只保存最后一行:

0 投票
1 回答
2752 浏览

coffeescript - 如何找到 Hubot 正在响应的房间的名称?

我正在编写一个 Hubot 脚本来连接我们工作中的跟踪系统。它应该触发带有各种参数的 PHP 脚本,然后该脚本会将响应发送到房间。

我怎样才能知道 Hubot 正在响应的消息来自哪个房间,以便我可以在我的 AJAX 请求中发送它?

这是我的脚本的样子:

0 投票
1 回答
86 浏览

git - Setting up the same repository twice under different names in janky

I have a build server which leverages janky as the glue between jenkins and hubot.

I was wondering if anyone knows of a clean way in janky to duplicate a specific repository under a different name?

The main problem that I'm trying to solve is that I have a regular build job and I would like to create a separate job that runs the complete test suite only when certain conditions occur. All that while I still leverage the benefits of janky (web interface, hubot controls, etc.).

As far as I could tell there was no clean way to create a second job in janky that points to the exact same github repository. Looking at the application, I wonder if I should try to hack in an interface through janky's console. Has anyone had the same issue as me? If so, how did they solve this problem? I would like to keep janky in the picture, if feasible.

0 投票
1 回答
342 浏览

javascript - 清除hubot上的计时器重新加载所有脚本

所以我有一个我正在写的hubot插件,它会在不同的时间间隔提醒用户做某事。我有一个 setInterval 函数,它每 5 分钟运行一次来​​做某事。问题是当我使用“重新加载所有脚本”命令(从这里:https ://github.com/github/hubot-scripts/blob/master/src/scripts/reload.coffee )它开始一个新的间隔而不清除旧的。我不确定如何最好地清除旧的间隔。重新加载脚本时,我的所有指针都会被覆盖。

0 投票
3 回答
3514 浏览

hubot - 如何设置 Hubot 的基本权限?

如何设置基本用户权限,使用户无法运行“Hubot die”或“Hubot show storage”之类的命令?

我可以看到有一个名为 hubot-auth 的脚本,但这似乎是为了在其他脚本中实现它而不是控制现有的命令。

0 投票
0 回答
189 浏览

hubot - Hubot:可以在 xmpp 聊天室中提及每个人吗?

亲爱的stackoverflowsians,

我们的 Hubot 有一个 XMPP 适配器并位于 XMPP 聊天室中。是否可以获取聊天室中所有其他用户的列表以让 hubot 提及他们?例如:

如果用户 johndoe、joe、bob 和 alice 在聊天中。

0 投票
1 回答
216 浏览

node.js - 我怎样才能删除“
“ Hubot httpd 脚本中的标签?

默认情况下,hubot httpd.coffee 脚本会在输出中放置一个 pre 标签。无论如何要删除它吗?我试图让hubot生成一些基本的html页面。

网页中的输出必须类似于: Hi, i am a robot

0 投票
1 回答
831 浏览

node.js - Generate table in hubot brain and insert values

I'm trying to make a table of values inside hubot and he pass it's values to redis-brain.coffee but i just know a way: robot.brain.get("blablabla"). This will get a string from redis-brain and i need some kind of table.

How I'll use it: At first call of this function, hubot will load the full database to the memory, then, if there's

So, how do I create a table in redis from hubot?

0 投票
3 回答
1473 浏览

hubot - Hubot如何在没有任何命令的情况下定期运行功能?

我正在尝试为hubot创建一个功能,每5分钟向一个房间发送一条消息,而无需任何命令,只需他自己。

我需要改变什么?