This guide will help you test the uwularpy GitHub App to ensure it's working correctly.
Before testing, make sure you have:
- Registered the GitHub App with the name "uwularpy"
- Configured the app permissions and webhook URL (https://uwu.larp.dev/webhook)
- Generated a private key for authentication
- Deployed the webhook handler to a server accessible at uwu.larp.dev
To test the webhook handler locally before deployment:
-
Clone a test repository with markdown files
-
Install dependencies:
cd uwularpy-webhook npm install -
Create a
.envfile with your GitHub App credentials:APP_ID=1214491 PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY----- Your private key content here -----END RSA PRIVATE KEY-----" WEBHOOK_SECRET=uwularp_webhook_secret PORT=3000 -
Start the server:
node app.js -
Use a tool like ngrok to expose your local server:
ngrok http 3000 -
Update the webhook URL in your GitHub App settings to the ngrok URL
-
Create an issue in a test repository and mention "@uwularpy" in a comment
After deploying to uwu.larp.dev:
- Install the GitHub App on a test repository
- Create an issue in the repository
- Add a comment mentioning "@uwularpy"
- Verify that:
- A new branch is created named "uwuify-issue-{issue_number}"
- All markdown files are uwuified
- A pull request is created
- The requester is mentioned in the pull request
If the app doesn't respond to mentions:
- Check the server logs for errors
- Verify the webhook URL is correctly set to https://uwu.larp.dev/webhook
- Ensure the app has the necessary permissions:
- Contents: Read & write
- Issues: Read & write
- Pull requests: Read & write
- Check that the webhook secret matches between the GitHub App settings and your .env file
- Verify the private key is correctly formatted in your .env file
You can test the webhook handler with a sample payload:
curl -X POST https://uwu.larp.dev/webhook \
-H "Content-Type: application/json" \
-H "X-GitHub-Event: issue_comment" \
-H "X-Hub-Signature-256: sha256=..." \
-d '{
"action": "created",
"issue": {"number": 1},
"comment": {
"body": "Let's try @uwularpy",
"user": {"login": "testuser"}
},
"repository": {
"name": "test-repo",
"owner": {"login": "larp0"}
},
"installation": {"id": 12345678}
}'Note: You'll need to generate a valid signature for the payload using the webhook secret.