-
Notifications
You must be signed in to change notification settings - Fork 2
Testing Guide
Armaan singh bhau edited this page May 6, 2026
·
1 revision
Testing Reposhield locally requires simulating GitHub webhooks so that the AI pipeline triggers without needing to constantly push real code. Follow this guide to test the background workers and AI integration safely.
Ensure your local environment is fully running:
- Next.js Dev Server (
bun run dev) - Inngest CLI (
npx inngest-cli@latest dev) - Ngrok tunnel (
ngrok http 3000)
Instead of creating real Pull Requests to test your code, you can use tools like Postman, cURL, or the GitHub CLI to send a mock webhook directly to your local endpoint.
Send a POST request to your ngrok URL: https://YOUR_NGROK_URL.ngrok-free.app/api/webhooks/github
Required Headers:
Content-Type: application/jsonX-GitHub-Event: pull_request-
X-Hub-Signature-256: (If you have signature validation enabled locally, you will need to generate a valid hash. For rapid local testing, you can temporarily disable theverifySignaturecheck inroute.ts).
Mock Payload Body:
{
"action": "opened",
"pull_request": {
"number": 1,
"title": "Test PR",
"html_url": "https://github.com/owner/repo/pull/1"
},
"repository": {
"id": 12345678,
"full_name": "owner/repo",
"owner": {
"login": "owner"
}
}
}