- Expose your local server using ngrok
- Create and configure a GitHub App
Expose your local server
GitHub requires a public URL to send webhook events. Run:https://abc123.ngrok.io)
You will use this URL while configuring your GitHub App.
Create a Github App
- Go to GitHub Developer Settings → GitHub Apps
- Click New GitHub App
Configure basic settings
App Name
Choose any name (example:CodeWolf)
Webhook URL
Here paste your ngrok URL with/webhook in the end
Set permissions
Under Repository permissions, configure:- Pull requests: Read & Write
- Contents: Read
- Metadata: Read
Subscribe to events
Enable:- Pull request events
Generate Private Key
After creating the app:- Scroll to Private keys
- Click Generate a private key
- Download the
.pemfile
Update environment variables
Add the following to your.env file:
Install the Github App
- Go to your GitHub App page
- Click Install App
- Select your repository
Verify Setup
- Open a pull request in your repository
- CodeWolf should receive the webhook event
- A review comment should appear on the PR
Troubleshooting
- Ensure ngrok is running and URL is correct
- Verify webhook URL ends with /webhook
- Check server logs for errors
- Confirm permissions are set correctly
- Make sure the app is installed on the repository