Web: Add slack bot integration

Created on 20 Jan 2018  路  37Comments  路  Source: gitcoinco/web

Description

It would be nice to be able to have a slack integration that would notify our team when bounties have been posted to one of our repositories.

What

  • An area in my settings where I can specify a slack API key (or key pair)
  • an area in the settings where I can define what repos I want slack updates on
  • An area in my settings where I can define what channel I want slack updates in

then

Any updates to github that hit maybe_market_to_slack() will also hit my slack channel

beginner help wanted

Most helpful comment

@mkosowsk -- Thanks for looping me in here. I really haven't faced such issue, not that I have experience with Slackbot integrations but the error sounds bit weird to me.

@rachana-prajapati -- I'd recommend creating a WIP PR, so that we can take a look at the code and also try to replicate the issue and see how to resolve the same. While you're at it, maybe you can also go through this thread which sounds similar to what you're seeing and let us know if this helps. Thanks.

All 37 comments

Interesting! Want to post some quick thoughts on this altho I won't have time to tackle the issue. And truth be told, this functionality may already exist! But I don't know if it does

Changes to bounties are posted to the notif-gitcoin channel on the Gitcoin slack

https://gitcoincommunity.slack.com/messages/C8DCUQU91/convo/C7A4F4UHK-1516388972.000266/

An example message:

screen shot 2018-01-20 at 5 35 02 pm

So looks like it wouldn't be a big ask to get this functionality as this info is already being used by the Slack API Tester. Just do a quick check on the Github url for projects that want to be notified and blast them out.

May be a silly question, but I imagine you would want the Slack notifications to be on your team's Slack and not on the Gitcoin Slack?

@mkosowsk - a way to get those same notifications into our team's slack is exactly what I am after. Not urgent or needed ASAP, but I think a cool enhancement in general that would probably provide utility for a lot of teams.

Cool, that makes sense to me. Want to ping @owocki or @vs77bb, does this already exist?

If not, I may fund it myself with something like .05 ether come Tuesday... seems like some cool functionality 馃憤

this does not exist already yet..

i think we need some way for github repo admins to be able to auth to github (to prove they own a repo) and save a SLACK API key (and preferred channel for their slack) in the system...

from there, we can have slackbot post each time there is an issue update

Great! Think it's worth adding funding to the issue now or should we wait for a bit more of the groundwork to be built up?

@mbeacom and i are working on getting github integration built in this month.. after that i think this would be worth bounty-ing

Cool, will keep my eyes peeled for that 馃憤

just updated the spec here and bountying it

__This issue now has a funding of 0.3 ETH (159.6 USD @ $531.99/ETH) attached to it.__

  • If you would like to work on this issue you can claim it here.
  • If you've completed this issue and want to claim the bounty you can do so here
  • Questions? Get help on the Gitcoin Slack
  • $2870.38 more Funded OSS Work Available at: https://gitcoin.co/explorer

hey guys - not that this isn't awesome, but I hope this isn't only on my behalf. We just recently made the decision to switch to discord due to the ability to moderate things better after some horror stories around public facing slack teams.

I'm interested in working on this, but am not sure where to start. I saw the beginner label, so I thought that I might be able to figure it out and learn about slack integration. Any pointers/steps y'all might recommend? @owocki @mkosowk

@mkosowsk

Low on cycles at the moment, paging the illustrious @mbeacom 馃憤

@owocki "my settings" should be in the form of interactive message through slack bot ?

Working on this.... will be able to complete it within given timeline.

hii @owocki, the "settings" tab / page you mentioned in the description is some functionality that has been there in slack or our bot should ask about this ?

the settings page => http://gitcoin.co/email/settings

Do I need to create similar kind of settings page for bot related fields ?

i think the requirements specify "An area in my settings " -- so it could either be a page in one of the many settings tabs ( see https://github.com/gitcoinco/web/issues/795 ) or just a module on one of the settings pages

Working on this... Stuck at one place.. hopefully ll b able to resolve it asap..

@rachana-prajapati what issue are you stuck on? Good to share with the Gitcoin community, it's a super friendly and helpful bunch! 馃憤馃徎

Sending necessary JSON to slack requires a 'https' request. While sending JSON in the https request, it's saying: "certificate verification failed".. Tried all possible ways but no luck.

@eswarasai you seen this one before? A resolution is worth 0.025 ETH 馃憤馃徎

@mkosowsk -- Thanks for looping me in here. I really haven't faced such issue, not that I have experience with Slackbot integrations but the error sounds bit weird to me.

@rachana-prajapati -- I'd recommend creating a WIP PR, so that we can take a look at the code and also try to replicate the issue and see how to resolve the same. While you're at it, maybe you can also go through this thread which sounds similar to what you're seeing and let us know if this helps. Thanks.

@eswarasai we are trying to use slack api web hook to post the message and from postman we are able to send the message perfectly. But the only concern is there this web hooks are generated from
slack api page. https://api.slack.com/apps/A9YNULSG7/incoming-webhooks and we are not able to find the way to automating the process. Do you know is there any exposed api which can help to generate this ?

@gunjan95 -- Sorry for the delayed response. If I understand correctly, you're trying to generate Slack API Webhook URL via an API Request? If so, is this even necessary? I'm afraid I don't understand your thoughts behind this implementation.

I have tried different approach now. using slack client I am able to send message.

Now we are fine with getting one flow message to channel whenever one issue is created on github.

@eswarasai can you help me with the existing source code. So that I can write some logic to add settings. Html pages I need to change and database which I am supposed to use. These all are now blockers for me.
the settings page => http://gitcoin.co/email/settings
where is the code for this page ?

@gunjan95 -- Sure.
HTML -- email_settings.html

W.r.t. technical implementation of the task in the Backend, it'd be better if you can discuss this with either @owocki or @mbeacom before actually jumping to the implementation.

thanks @eswarasai
@owocki is there any preferable db which we need to use and please guide us to existing DBModel .

is there any preferable db

you can use the existing postgres DB.. i'd probably recommend creating a new model for this info

hey @gunjan95 -- are you still working on this?

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work has been started on the 0.3 ETH (204.12 USD @ $680.39/ETH) funding by__:

  1. @darkdarkdragon

On the above list? Please leave a comment to let the funder (@owocki) know your plan. If you don't leave a comment, the funder may expire your submission at their discretion.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work for 0.3 ETH (198.45 USD @ $661.51/ETH) has been submitted by__:

  1. @darkdarkdragon
  2. @darkdarkdragon

@owocki please take a look at the submitted work:

  • PR by @darkdarkdragon
  • PR by @darkdarkdragon

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__The funding of 0.3 ETH (204.12 USD @ $680.39/ETH) attached to this issue has been approved & issued to @darkdarkdragon.__

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abitrolly picture abitrolly  路  4Comments

pelsasser picture pelsasser  路  4Comments

mbeacom picture mbeacom  路  4Comments

kuhnchris picture kuhnchris  路  4Comments

christianbundy picture christianbundy  路  3Comments