asyncapi / .github

Location of all reusable community health files
31 stars 66 forks source link

Create a slack bot that stores selected threads in Discussions #54

Closed derberg closed 1 year ago

derberg commented 3 years ago

Once we have the above, we can think of doing another bot that can pull answers from discussions and suggest them in the message thread on slack. This is long-term though, we need to have a lot of discussions first.

See also: https://github.com/asyncapi/community/issues/26

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity :sleeping: It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation. Thank you for your contributions :heart:

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity :sleeping: It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation. Thank you for your contributions :heart:

KhudaDad414 commented 2 years ago

@derberg this seems interesting. can I work on this? if yes, is there anything you would like to add?

derberg commented 2 years ago

@KhudaDad414 ❤️ I would only add that since Slack has https://github.com/slackapi/slack-api-specs/blob/master/events-api/slack_events_api_async_v1.json (we could convert to 2.2 easily) and it is all about reacting to events, would be cool to try using Glee to write the bot. So describe your bot with AsyncAPI file, to what events and where it subscribes and kick-off project with Glee. Thoughts?

KhudaDad414 commented 2 years ago

@derberg this bot is nearly ready. before adding it to the slack workspace we need to discuss a few things.

How it should work?

Since the data that is being collected needs to be organized and meaningful to be useful in the future(for suggesting answers), IMO we should have a clear question, answer format. How? 1) someone asks a question. 2) a maintainer asks follow-up questions in the thread. (optional) 3) maintainer answers the question and adds a specified emoji, like 🥇 or ✅ to the answer. (if there is one) 4) maintainer invokes the bot by some command like @bot save or @bot store in the thread. 5) the bot will save the thread in the Q&A category and mark the answer in the discussion as well. 6) profit 😃

or there is a discussion that we want to save for historic preservation purposes: 1) there is a discussion that is worth saving. 2) ask the bot to save it. 3) the bot will save it in another category. 6) profit 😃

Structure of the discussion.

discussion body should be the question or the main message. I am not sure what we should put in the title. any suggestions? each thread message will be a comment in the discussion.

Some thoughts

1) I see we already have github-actions bot already added to the slack and it is a boring name. what about changing its name to Eve or Chan? I mean we already have them in the organization 😄.

2) instead of triggering the bot with a single emoji, I think it would be better to trigger the bot by mentioning it. like @Chan please save this thread. or @Chan save or @Chan please store this. this way the bot doesn't have to be triggered by every single message in the slack, instead it will only respond when someone mentions it.

derberg commented 2 years ago

this bot is nearly ready WHAT?! Super cool!!!

don't want to be a party pooper but I love your suggestions, and side effect is that sounds to me like you need to build Slack app maybe, so I can interact with it through /.

so like

yes, I think the title must be provided manually, no chance to really guess it

An additional pro tip for having it as app is that you can commercialize it 😉 I actually had a plan to do it with my brother some time ago, as part of his coding learning process. Many folks run away from Slack because of lack of history, but for 5bucks they would stay and use the app 😄

KhudaDad414 commented 2 years ago

Update: the slack bot is ready, https://github.com/khudaDad414/bot-the-savior

things that are remaining: 1) Creating the support repo. 2) Figuring out where and how to host it. 3) Adding the bot to the async API slack channel.

cc: @derberg

derberg commented 2 years ago

🚀

https://github.com/khudaDad414/bot-the-savior

Readme 😆 demo or it didn't happen 😆

Creating the support repo.

yeah, I'm not 100% sure about, once ready we need to ask community. Maybe we should have it in community repo?

Figuring out where and how to host it.

Easy, we have DigitalOcean credits, k8s cluster there and we can push apps there

Adding the bot to the async API slack channel

let's test it out, yeah!

KhudaDad414 commented 2 years ago

@derberg

Readme

added a README. :smile:

Maybe we should have it in community repo?

Yeah, It would make sense to have the discussions there. the only thing that worries me a little is that GitHub will send notifications and emails to the community repo watchers with each discussion opened by the bot.

we have DigitalOcean credits, k8s cluster there and we can push apps there.

For testing, I have hosted it in Heroku and sent a request to our slack workspace admins.

we just need to specify where we want the bot to save the discussions and a token with create_discussion permission from one of the bots and we are good to go.

derberg commented 2 years ago

the only thing that worries me a little is that GitHub will send notifications and emails to the community repo watchers with each discussion opened by the bot.

it sounds bad but actually is good, as you or me won't control how is the app being used, what is actually archived/saved. Notifications will let you know about it. Thoughts?

sent a request to our slack workspace admins.

approved. As if it comes to Heroku, let us make sure you do not pay for anything on your own.

we just need to specify where we want the bot to save the discussions and a token with create_discussion permission from one of the bots and we are good to go.

I propose we test it now on community repo. Save example 3 threads and then you can ask the community where it should land, what is their opinion.

I sent you a token in private

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart: