A GitHub App that automatically posts a cat LGTM image when a pull request is approved.
- Automatic: Just approve a PR - no manual action needed
- Random images: A different cat LGTM image every time from lgtmeow.com
- No duplicates: Posts only once per PR, even with multiple approvals
- Node.js >= 22
- npm
- GitHub account
npm install- Go to https://smee.io
- Click "Start a new channel"
- Copy the generated URL
- Go to GitHub Settings > Developer settings > GitHub Apps
- Click "New GitHub App"
- Configure:
- App name:
lgtm-cat-local-dev(or any unique name) - Homepage URL:
https://github.com/nekochans/lgtm-cat-github-app - Webhook URL: Your smee.io URL
- Webhook secret:
development - Permissions:
- Pull requests: Read & write
- Subscribe to events:
- Pull request review
- App name:
- After creation:
- Note the App ID
- Generate and download a Private Key
- Install the app on a test repository
cp .env.example .envEdit .env:
APP_ID=<your-app-id>
PRIVATE_KEY_PATH=./private-key.pem
WEBHOOK_SECRET=development
WEBHOOK_PROXY_URL=<your-smee-url>
LGTMEOW_BASE_URL=https://api.lgtmeow.comPlace the downloaded private key file as private-key.pem in the project root.
npm run build
npm start- Create a PR in the repository where the app is installed
- Approve the PR
- Check the terminal logs for the
pull_request_review.submittedevent
npm run build- Compile TypeScriptnpm start- Start the appnpm run dev- Build and startnpm run lint- Run linternpm run fix- Auto-fix lint and format issues
This project uses ultracite for linting and formatting.
# Check for lint issues
npm run lint
# Auto-fix issues
npm run fix- Fly.io CLI
- Fly.io account
fly auth loginfly apps create lgtm-cat-botfly secrets set APP_ID="your-github-app-id"
fly secrets set PRIVATE_KEY="$(cat ./private-key.pem)"
fly secrets set WEBHOOK_SECRET="your-webhook-secret"fly deployUpdate your GitHub App settings:
- Webhook URL:
https://lgtm-cat-bot.fly.dev/api/github/webhooks
# Check app status
fly status
# View logs
fly logs
# SSH into the machine
fly ssh console