GitHub App webhook server that automatically maintains README.md files by analyzing pull request changes with Claude AI.
- Install the GitHub App on your repositories
- Server receives webhook when PRs are opened/updated
- Claude AI analyzes the changes for documentation needs
- Bot commits README updates directly to the PR branch
- Go to GitHub Settings > Developer settings > GitHub Apps
- Click "New GitHub App"
- Set webhook URL to your server:
https://yourserver.com/webhook
- Enable these permissions:
- Contents: Read & Write (to read/update README)
- Pull requests: Read (to analyze PRs)
- Subscribe to Pull request events
# Clone and setup
git clone https://github.com/your-username/readme-bot
cd readme-bot
# Set environment variables in Digital Ocean Functions
# Configure in project.yml or Digital Ocean dashboard
# Deploy function
doctl serverless deploy .
Configure these in your Digital Ocean Functions environment:
# Required
ANTHROPIC_API_KEY=sk-ant-your-claude-api-key
GH_APP_ID=your-github-app-id
GH_PRIVATE_KEY=your-github-app-private-key
# Optional
WEBHOOK_SECRET=your-webhook-secret
- Environment variables - New
process.env.*
usage - Dependencies -
package.json
changes - Features - New API endpoints, CLI commands
- Setup changes - Docker, build scripts, installation steps
- Architecture - New services, database changes
# Install dependencies in function directory
cd packages/readme-bot/webhook
npm install
# Build TypeScript
npm run build
# Deploy to Digital Ocean Functions
cd ../../../
doctl serverless deploy .
# Deploy function
doctl serverless deploy .
# Get function URL
doctl sls fn get readme-bot/webhook --url
# Invoke function for testing
doctl serverless functions invoke readme-bot/webhook