Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add slack bot integration #259

Closed
0xean opened this issue Jan 20, 2018 · 37 comments
Closed

Add slack bot integration #259

0xean opened this issue Jan 20, 2018 · 37 comments

Comments

@0xean
Copy link

0xean commented Jan 20, 2018

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

@mkosowsk
Copy link

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?

@0xean
Copy link
Author

0xean commented Jan 20, 2018

@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.

@mkosowsk
Copy link

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 👍

@owocki
Copy link
Contributor

owocki commented Jan 22, 2018

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

@mkosowsk
Copy link

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?

@owocki
Copy link
Contributor

owocki commented Jan 22, 2018

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

@mkosowsk
Copy link

Cool, will keep my eyes peeled for that 👍

@owocki
Copy link
Contributor

owocki commented Mar 19, 2018

just updated the spec here and bountying it

@gitcoinbot
Copy link
Member

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

@0xean
Copy link
Author

0xean commented Mar 19, 2018

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.

@mdew192837
Copy link

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

@mdew192837
Copy link

@mkosowsk

@mkosowsk
Copy link

Low on cycles at the moment, paging the illustrious @mbeacom 👍

@mbeacom
Copy link
Contributor

mbeacom commented Mar 26, 2018

@gunjan95
Copy link

gunjan95 commented Mar 31, 2018

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

@rachana-prajapati
Copy link

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

@gunjan95
Copy link

gunjan95 commented Apr 5, 2018

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 ?

@owocki
Copy link
Contributor

owocki commented Apr 5, 2018

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

@gunjan95
Copy link

gunjan95 commented Apr 5, 2018

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

@owocki
Copy link
Contributor

owocki commented Apr 5, 2018

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 #795 ) or just a module on one of the settings pages

@rachana-prajapati
Copy link

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

@mkosowsk
Copy link

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

@rachana-prajapati
Copy link

rachana-prajapati commented Apr 11, 2018

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.

@mkosowsk
Copy link

@eswarasai you seen this one before? A resolution is worth 0.025 ETH 👍🏻

@eswarasai
Copy link
Contributor

@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.

@gunjan95
Copy link

@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
Copy link

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

@gunjan95
Copy link

gunjan95 commented Apr 12, 2018

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

@gunjan95
Copy link

@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 ?

@eswarasai
Copy link
Contributor

@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.

@gunjan95
Copy link

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

@owocki
Copy link
Contributor

owocki commented Apr 12, 2018

is there any preferable db

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

@owocki
Copy link
Contributor

owocki commented Apr 18, 2018

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

@gitcoinbot
Copy link
Member

gitcoinbot commented Apr 19, 2018

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.

darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 21, 2018
- send same messages to user's slack as to gitcoin's slack

Fixes: gitcoinco#259
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 21, 2018
- send same messages to user's slack as to gitcoin's slack

Fixes: gitcoinco#259
@gitcoinbot
Copy link
Member

gitcoinbot commented Apr 21, 2018

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:

darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 23, 2018
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 23, 2018
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 24, 2018
- send same messages to user's slack as to gitcoin's slack

Fixes: gitcoinco#259
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 24, 2018
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 24, 2018
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 24, 2018
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 24, 2018
- send same messages to user's slack as to gitcoin's slack

Fixes: gitcoinco#259
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 24, 2018
- send same messages to user's slack as to gitcoin's slack

Fixes: gitcoinco#259
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 24, 2018
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 26, 2018
- send same messages to user's slack as to gitcoin's slack

Fixes: gitcoinco#259
darkdarkdragon added a commit to darkdarkdragon/web that referenced this issue Apr 26, 2018
mbeacom pushed a commit that referenced this issue Apr 27, 2018
* - add slack settings tab on user's settings page
- send same messages to user's slack as to gitcoin's slack

Fixes: #259

* Update models.py

* Fix indent on docstring

* Fix docstrings

* no len, switch to fstring

* better description for slack integration
Fixes: #259

* translate button value

* added placeholder for slack channel input box

* remove migration, needs to be regenerated

* remove need to own repo to get slack notifications

* Update bad reverse

* Make url names unique
@gitcoinbot
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants