An AI-powered GitHub issue analysis platform that automatically evaluates and categorizes incoming issues using Google's Gemini AI. Git-IssueLens integrates with GitHub webhooks to receive issue events, analyzes them against repository context, and provides actionable insights through a modern web dashboard.
- GitHub Webhook Integration: Automatically receives and processes GitHub issue events via secure webhooks
- AI-Powered Analysis: Uses Google Gemini 2.0 Flash to analyze issues based on repository context and README content
- Smart Categorization: Automatically categorizes issues by type (Bug Report, Feature Request, Documentation, Question, Other)
- Priority Assessment: AI assigns priority levels (Low, Medium, High) based on issue content and scope
- Scope Matching: Evaluates how well issues align with repository scope (0-100 score)
- Worthiness Evaluation: Classifies issues as Useful, Duplicate, Out of Scope, Too Vague, or Low Impact
- Confidence Scoring: Provides confidence metrics for AI recommendations
- Interactive Dashboard: Modern React-based dashboard for viewing and managing issues
- Repository Configuration: Easy setup for connecting GitHub repositories
- Secure Webhook Verification: HMAC-SHA256 signature verification for webhook security
- React 18 - UI framework
- Vite - Build tool and dev server
- TailwindCSS - Styling
- React Router - Client-side routing
- Jest - Testing framework with React Testing Library
- Node.js - Runtime environment
- Express - Web framework
- MongoDB - Database (via Mongoose)
- Google Generative AI - AI analysis (Gemini 2.0 Flash)
- CORS - Cross-origin resource sharing
- dotenv - Environment configuration
- Jest - Unit and integration testing
- Supertest - HTTP endpoint testing
- MongoDB Memory Server - In-memory MongoDB for testing
- ngrok - Webhook tunneling for local development
Git-IssueLens/
├── client/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components (Home, Configure, Dashboard)
│ │ └── __tests__/ # Frontend tests
│ ├── public/ # Static assets
│ └── package.json # Frontend dependencies
├── server/ # Node.js/Express backend
│ ├── models/ # Mongoose models (Issue, Project, RepoConfig)
│ ├── routes/ # API routes (webhook, issues, project, config)
│ ├── services/ # Business logic (GitHub, Gemini, Webhook services)
│ ├── __tests__/ # Backend tests
│ ├── .env # Environment variables
│ └── server.js # Main server entry point
└── package.json # Root dependencies (ngrok)
- Node.js (v18 or higher)
- MongoDB (local instance or MongoDB Atlas account)
- Google Gemini API key
- GitHub account (for webhook setup)
-
Clone the repository
git clone <repository-url> cd Git-IssueLens
-
Install root dependencies
npm install
-
Install server dependencies
cd server npm install -
Install client dependencies
cd ../client npm install
-
Create environment file Create a
.envfile in theserver/directory:MONGO_URI=mongodb://localhost:27017/git-issuelens GEMINI_API_KEY=your_gemini_api_key_here PORT=5000 WEBHOOK_BASE_URL=https://your-ngrok-url.ngrok-free.dev
-
Get Google Gemini API Key
- Visit Google AI Studio
- Create a new API key
- Add it to your
.envfile
-
Setup MongoDB
- For local development: Install MongoDB and run
mongod - For production: Use MongoDB Atlas and update
MONGO_URI
- For local development: Install MongoDB and run
-
Start the backend server
cd server npm run devServer runs on
http://localhost:5000 -
Start the frontend development server
cd client npm run devClient runs on
http://localhost:5173 -
Setup ngrok for webhooks (optional, for local development)
ngrok http 5000
Update
WEBHOOK_BASE_URLin.envwith your ngrok URL
-
Build the frontend
cd client npm run build -
Start the backend server
cd server npm start
- Navigate to your GitHub repository settings
- Go to Webhooks → Add webhook
- Set the payload URL to:
https://your-domain.com/api/webhook/github - Set content type to
application/json - Add your webhook secret (configured in the app)
- Select "Issues" events
- Click "Add webhook"
POST /api/webhook/github- Receive GitHub issue events
GET /api/issues- Get all issuesGET /api/issues/:id- Get specific issuePOST /api/issues/:id/analyze- Trigger AI analysis for an issue
GET /api/project- Get project informationPOST /api/project- Create/update project
GET /api/config- Get repository configurationPOST /api/config- Update repository configurationPOST /api/config/webhook- Setup webhook configuration
cd server
npm testcd client
npm testThe Gemini AI analyzes issues based on:
- Repository Context: Uses repository name, description, and README content
- Issue Content: Analyzes title, body, and labels
- Scope Alignment: Scores how well issues match repository scope (0-100)
- Priority Assignment: Recommends Low, Medium, or High priority
- Worthiness Classification: Categorizes as Useful, Duplicate, Out of Scope, Too Vague, or Low Impact
- Issue Type Detection: Identifies Bug Reports, Feature Requests, Documentation, Questions, or Other
- Recommendations: Provides Accept, Review Further, or Reject recommendations
- Confidence Scoring: Rates confidence in analysis (0-100)
- HMAC-SHA256 webhook signature verification
- Environment variable configuration
- CORS protection
- Input validation and sanitization
- Error handling and logging
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
For issues and questions, please open an issue on the GitHub repository.