Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Question about GitHub integration

Open zb471914758 opened this issue 10 years ago • 12 comments

Your Rocket.Chat version: (make sure you are running the latest) meteor web

zb471914758 avatar Feb 25 '16 08:02 zb471914758

This is done by hubot, it was done that way because we got the hubot integration before we have webhooks. Now you can configure the both.

sampaiodiego avatar Feb 25 '16 11:02 sampaiodiego

@sampaiodiego Does the hubot integration mean the code packages/rocketchat-hubot and the hubot.coffee script? Thanks!

zb471914758 avatar Feb 26 '16 02:02 zb471914758

@zb471914758 no.. this hubot.coffe is an internal hubot and the one who has the github integration is the one from the repo https://github.com/RocketChat/Rocket.Chat.Hubot

maybe @Sing-Li can explain better why we have both.

sampaiodiego avatar Feb 26 '16 02:02 sampaiodiego

Thanks, @sampaiodiego --- I'll try :)

So @zb471914758, there are two different ways you can have GitHub activities posted to a channel.

  1. The easiest is incoming webhooks. Menu : Admin->Integrations This is also one of the newest feature we have. It requires no additional server resources and is quite easy to configure.
  2. The second one is via our NPM hubot-in-a-module, named BaronBogo : https://www.npmjs.com/package/hubot-baronbogo You'll need to run this on a separate process or server for it to work. The image you posted above is from BaronBogo.

The internal bot (named Rocket.Cat) is designed for those who wants to experiment with hubot technology but do not want to, or do not have access to, additional server resources. It is relatively limited, and currently does not support GitHub integrations.

Sing-Li avatar Feb 26 '16 03:02 Sing-Li

@sampaiodiego,@Sing-Li When I install hubot-baronbogo, export REPOSITORY_NAME="RocketChat/Rocket.Chat" export HUBOT_GITHUB_EVENT_NOTIFIER_TYPES=issues and then execute bin/hubot hubot> hubot our issues but I get nothing, and get an error "ERROR { [Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }"

The code is:

    robot.respond /our issues/i, (res) ->
        url = "https://api.github.com/repos/" + our_repo + "/issues?state=open"

        github.get url, (issues) ->
            res.send disp_issues(issues, false)

Do you know why? Thank you very much!

zb471914758 avatar Feb 26 '16 07:02 zb471914758

Depends on #2426

engelgabriel avatar Mar 04 '16 14:03 engelgabriel

We will remove the dependency on hubot on the next version

engelgabriel avatar Mar 04 '16 14:03 engelgabriel

Please see initial documentation at https://github.com/RocketChat/Rocket.Chat/wiki/WebHook-Scripting---GitHub

engelgabriel avatar Mar 08 '16 15:03 engelgabriel

@engelgabriel the example scripts are extremely helpful. Any chance these could be extended quickly with an example that allows git pushes to be shown with the corresponding commit message(s) and an URL to the commit?

andreas-bulling avatar Mar 23 '16 05:03 andreas-bulling

We are working on that, and w way to share scripts via a online catalogue too.

engelgabriel avatar Mar 23 '16 15:03 engelgabriel

Are there any example scripts to integrate incoming webhook in rocket chat from gogs webhook? I tried this script but its not working with combination gogs->rocket.caht https://rocket.chat/docs/administrator-guides/integrations/github

supriya999 avatar Jul 19 '16 07:07 supriya999

@supriya999 beauty of Rocket.Chat is you can actually just use the slack webhook option in gogs and give it the integration URL and it'll just work.

Looks like main question was answered. Closing

geekgonecrazy avatar Oct 27 '16 20:10 geekgonecrazy