-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Discord GFI webhook #12500
Discord GFI webhook #12500
Conversation
WalkthroughThe recent update introduces a new utility function for converting GitHub labels into text, alongside a webhook handler for Next.js. This handler is designed to monitor GitHub issues labeled as "good first issue" and, when such an issue is unassigned, automatically sends a notification to a specified Discord channel. This enhancement aims to streamline the process of identifying and communicating new, beginner-friendly issues to potential contributors. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files selected for processing (2)
- src/lib/utils/gh.ts (1 hunks)
- src/pages/api/gfi-issues-webhook.ts (1 hunks)
Additional comments: 2
src/pages/api/gfi-issues-webhook.ts (2)
- 17-18: Ensure that the API correctly handles other HTTP methods by returning a 405 status code. This is a good practice for API design.
- 68-71: Proper error handling is implemented for the case where the Discord webhook response is not OK. Logging the error is a good practice, but consider also implementing a mechanism to alert the maintainers or retry the operation, as this could be a critical failure point in the notification system.
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.
@pettinarip Am I correct that this isn't implemented anywhere yet?
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.
Hmm not sure if I follow you on this. Inside our project? this api doesn't exist nor the logic itself does.
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.
Maybe you are confused with the similar logic in #12436. I'm sorry about that, we have decided to go with this implementation for now. I have closed the other one.
Description
Simpler alternative to #12436 using the GH webhooks service. Whenever an issue changed, the new api route
/api/gfi-issues-webhook
is going to be called.Summary by CodeRabbit