-
-
Notifications
You must be signed in to change notification settings - Fork 773
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
feat: add discussion saviour bot as as lambda function #1194
Conversation
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-1194--asyncapi-website.netlify.app/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! As I see you didn't install the @netlify/functions
dependency, so how did you test it 😄?
Co-authored-by: Maciej Urbańczyk <urbanczyk.maciej.95@gmail.com>
Co-authored-by: Maciej Urbańczyk <urbanczyk.maciej.95@gmail.com>
Co-authored-by: Maciej Urbańczyk <urbanczyk.maciej.95@gmail.com>
Co-authored-by: Maciej Urbańczyk <urbanczyk.maciej.95@gmail.com>
Co-authored-by: Maciej Urbańczyk <urbanczyk.maciej.95@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magicmatatjahu thanks for the review. I was actually testing it in another repo 😆
👁️ 🙏
@derberg @magicmatatjahu @akshatnema pinging for visibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KhudaDad414 Can you please add comments for future reference so that everyone can understand the implementation and logic behind code.
Also, will the Save to Github
feature be enabled to all users? If yes, the user has to integrate GitHub with Slack in order to save the Slack in a Discussion?
}, | ||
"devDependencies": { | ||
"@netlify/functions": "^1.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we add @netlify/functions
as a devDependency as we need netlify cli to integrate Netlify functions with frontend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have only been using some types from @netlify/functions
and it's cli for testing functions. that's why I think it should be in devDependencies.
@akshatnema Hey mate. I have refactored the code and added comments for clarity. 👀 🙏
Yes, It will be enabled for all users. And no, users won't need a GitHub with Slack integration for this to work since we will use one of the bot's API keys to access Slack discussions and store them in GitHub. |
Sorry for the delay @KhudaDad414, I was quite on medical leave and just recovered from it in weekend.
So, if everyone has access, it may happen the someone from the community spam a lot of threads in the GitHub discussions. We in this case should have control over this. And also, our API Key has been used to generate Github discussions, the token may result in rate limit due to excessive use by community members. So, in my opinion, you should have some restrictions on the use of this feature. WDYT? @derberg |
@akshatnema Happy to hear that you have recovered. Welcome back, mate! |
I think the best we can do is improve the message to show the user who saved the discussion and then we can block the bad actors from the Slack community itself.
I don't think the usage area of this feature is that common. Yes, it can happen but the user has to save around 100 discussions to use 1000 points. which I don't think is that worrisome. |
I will prefer for having this permission for TSC_Members only because for any thread in Slack, a TSC member can very well judge/decide whether this thread should be saved in discussion or not. Secondly, if a non-TSC member wants to save a thread of Slack, he can surely ask any of the TSC members or Community managers (like @derberg) to add the respective thread on GitHub. This is what I think about the functionality we should have. |
tbh I do not worry people will spam us because of misuse. We were afraid the same will happen with feedback for on docs, and yeah, nothing bad happened. I'm more concerned on the limit of free functions invocation, but again, YOLO 😆 , if we will hit the limit, we can think about custom backend on digital ocean 🤷🏼 In github discussion, at the top, in main message we need to indicate where it is coming from, and provide link to slack btw Khuda you plan to write an article about it, right? RIGHT? 😄 btw nice code, if only not TS 🤣 |
It was there in the first version, 🤦 adding it now.
right. 😄
Come on man, don't do whatever you did to Twitter to TS as well. 😆 some of us actually like it. 😄 |
@derberg 👁️ 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish I could test this on some of my test repos but looks like will not be able to. But yeah, I believe in @KhudaDad414 and hence approving ✔️
@akshatnema thanks mate. |
@akshatnema yeah this dude already pushed some not tested changes to CI and I bet he learned to test things now before merging 😆 @KhudaDad414 from Poland with love 😆 btw netlify environment variable is set and ready |
@derberg Those are some big allegations you are making brother. (please don't send any links in this PR, we don't like that. 😆) |
/rtm |
Description
after this PR is merged, we can update its link in slack and everything should be in place.
How it works
this is how a thread can be moved to GitHub:
Save to GitHub
in the overflow menu of the message:Click on save.
A message will be posted in that thread confirming where the message is preserved.
How it looks