A Probot app that uses AI to provide documentation improvement suggestions in pull requests.
- Monitors pull request changes
- Automatically analyzes documentation in the code
- Uses AI to suggest improvements to comments and documentation
- Posts suggestions as review comments on the pull request
The application is organized into the following modules:
- src/index.ts: Main entry point that sets up event handlers
- src/types: Type definitions for the application
- src/services: Services for interacting with GitHub API
- src/ai: AI functionality for generating suggestions
# Install dependencies
npm install
# Build the app
npm run build
# Start the app
npm start# Run the app in development mode with auto-reloading
npm run dev
# Run tests
npm testCreate a .env file with the following variables:
# GitHub App credentials
APP_ID=
WEBHOOK_SECRET=
PRIVATE_KEY=
# OpenAI API key
OPENAI_API_KEY=
If you encounter TypeScript compilation errors related to missing types, ensure you have all required type definitions installed:
# Install required type definitions
npm install --save-dev @types/json-schema- The app listens for pull request synchronize events and push events
- For each change, it analyzes the files modified
- When it finds documentation changes (comments, JSDoc, etc.), it sends them to an AI model
- The AI suggests improvements to the documentation
- The app posts these suggestions as review comments on the pull request
ISC