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

Feature | Bounty Hunter Discord notification #225

Closed

Conversation

aadeshkulkarni
Copy link

Closes #188

Objective:

to send bounty related push notifications on discord channel from Github PRs for CMS.

Approach:

  1. Create a Github webhook that sends PR comments to 100xDevs POST API Endpoint - https://app.100xdevs.com/api/discord/notification
  2. The Discord notification endpoint performs validations and makes a push notification to discord channel.

Setup:

  1. Add Github Webhook from here (https://github.com/100xdevs/cms/settings/hooks)

Github Webhook Configuration:

Payload URL: https://app.100xdevs.com/api/discord/notification
Content Type: application/json
Subscribe to the following events:

  • Discussion comments
  • Issue comments
  • Issues
  • Issue comments
  • Pull request review comments
  • Pull request review threads

Screenshot 2024-03-15 at 6 23 08 PM

  1. Create a Discord Webhook:
  • On your server, create a new channel with any name of your choice 'bounty'
  • Channel settings > Integrations > Create Webhooks > Copy Webhook URL
  • Add the URL to .env DISCORD_BOUNTY_WEBHOOK=[DiscordWebhookURL]

PS: To test this locally, you can use ngrok to spin up an endpoint for cms and put it in github webhook.
(to do this, simply setup ngrok and do a ngrok http http://localhost:3000 to get a public endpoint for testing.

Demo Video

bountry-hunter-pr.mov

@aadeshkulkarni
Copy link
Author

@hkirat - Is the current solution sufficient or should I add new issue notification to this as well ?

@hkirat
Copy link
Contributor

hkirat commented Mar 26, 2024

Will probably be an integration in https://github.com/code100x/github-sol-auto-dispenser

@hkirat hkirat closed this Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a discord bot
2 participants