Installation
Environment Variables
Create a GitHub App or use a Personal Access Token. GitHub Apps are recommended for team/organization bots.
Configuration Options
Setup
- Personal Access Token
- Single-Tenant App
- Multi-Tenant App
For personal projects or testing:
Webhook Handler
- Payload URL:
https://your-app.com/webhooks/github - Content type:
application/json - Secret: Your webhook secret
- Events:
Issue comments,Pull request review comments
Features
Supported Events
issue_comment(created) - Comments on PR Conversation tabpull_request_review_comment(created) - Line-specific comments on Files Changed tab
Thread Types
GitHub adapter supports two thread types: 1. PR-level threads (Conversation tab)Posting Comments
Post to PR conversation:Markdown Support
GitHub supports full GitHub Flavored Markdown:Cards
Cards are converted to GitHub Flavored Markdown tables:GitHub doesn’t support interactive components. Buttons are rendered as markdown links.
Thread IDs
GitHub thread IDs encode repository and PR information:- PR conversation:
github:vercel/next.js:12345 - Review thread:
github:vercel/next.js:12345:rc:98765
Message History
Fetch comments from a thread:Listing Threads
List all open PRs (threads) in a repository:Platform Limits
- Comment length: 65,536 characters
- File size: 25 MB per file in PR
- Rate limits: 5,000 requests/hour (authenticated), 60 requests/hour (unauthenticated)
Code Examples
Troubleshooting
Webhook signature fails
Webhook signature fails
- Verify
GITHUB_WEBHOOK_SECRETmatches the secret in GitHub settings - Ensure webhook Content-Type is
application/json - Check that request body is raw (not parsed)
Bot doesn't respond to comments
Bot doesn't respond to comments
- Enable “Issue comments” and “Pull request review comments” events
- Verify webhook URL is publicly accessible (HTTPS required)
- Check that app/PAT has
reposcope
Multi-tenant mode not working
Multi-tenant mode not working
- Use a persistent StateAdapter (Redis, not Memory)
- Ensure webhooks include
installationfield - Check that installation IDs are being cached (debug logs)
Can't post to review threads
Can't post to review threads
- Use the correct thread ID format:
github:owner/repo:123:rc:456 - Review comment ID is the ROOT comment, not the reply
- Ensure bot has write access to the repository
Required Permissions
GitHub App Permissions:- Pull requests: Read & write (post comments, read PRs)
- Issues: Read & write (for PR conversations)
- Metadata: Read (repository metadata)
repo- Full repository access
Creating a GitHub App
1
Create app
Go to GitHub Developer Settings and create a new GitHub App.
2
Configure permissions
- Pull requests: Read & write
- Issues: Read & write
- Metadata: Read
3
Subscribe to events
- Issue comments
- Pull request review comments
4
Generate private key
Generate and download the private key PEM file.
5
Install app
Install the app on your account or organization to get the installation ID.
Next Steps
Message Handling
Process comments and build review flows
GitHub Apps
Learn about GitHub Apps
Code Review Bots
Build automated code review assistants
State Management
Persist data across PR comments