A powerful web application for auditing GitHub repository issues and pull requests. GitAudit helps maintainers prioritize work by identifying important bugs, stale issues, promising feature requests, and community health metrics using intelligent analysis and optional AI-powered sentiment analysis.
- Important Bugs Detection: Automatically identify and prioritize critical bugs based on labels, reactions, comments, and optional AI sentiment analysis
- Stale Issues & PRs: Track issues and pull requests that may need re-validation or closure
- Feature Request Analysis: Discover promising feature requests from the community with AI-powered sentiment scoring
- Community Health: Monitor community engagement and maintainer response times
- GitHub OAuth: Secure authentication with GitHub
- Real-time Sync: Automatic synchronization with GitHub repositories
- Smart Caching: SQLite-based caching for fast performance
- AI-Powered Analysis: Optional sentiment analysis using Anthropic Claude or OpenAI GPT models
- Frontend: React, TypeScript, Vite, @wordpress/components, @wordpress/dataviews
- Backend: Node.js, Express, SQLite (better-sqlite3)
- Authentication: GitHub OAuth
- API: GitHub GraphQL API
- AI Integration: Vercel AI SDK with Anthropic Claude and OpenAI support
- Node.js 18+ and npm
- GitHub account
- (Optional) Anthropic or OpenAI API key for sentiment analysis
git clone https://github.com/Automattic/gitaudit.git
cd gitauditnpm installThis will install dependencies for both the client and server workspaces.
- Go to GitHub Settings → Developer settings → OAuth Apps → New OAuth App
- Fill in the details:
- Application name: GitAudit (or your preferred name)
- Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3001/auth/github/callback
- Click "Register application"
- Copy the Client ID and generate a Client Secret
Copy the example file and edit it:
cp server/.env.example server/.envEdit server/.env:
GITHUB_CLIENT_ID=your_client_id_here
GITHUB_CLIENT_SECRET=your_client_secret_here
SESSION_SECRET=your_random_secret_here
PORT=3001
CLIENT_URL=http://localhost:3000
DATABASE_PATH=/data/gitaudit.dbGenerate a secure session secret:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Copy the example file:
cp client/.env.example client/.envThe default configuration should work for local development:
VITE_API_URL=http://localhost:3001Start both client and server in development mode:
npm run devOr run them separately:
# Terminal 1 - Backend
npm run server
# Terminal 2 - Frontend
npm run clientThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- Login: Click "Sign in with GitHub" to authenticate
- Add Repository: Select a repository you have access to
- Initial Sync: Wait for the initial data fetch (may take a few minutes for large repos)
- Configure Settings:
- Set up label keywords for bugs, features, and priorities
- (Optional) Configure AI sentiment analysis with your API key
- Define maintainer team for community health metrics
- Explore Insights: Navigate through different views:
- Important Bugs: Prioritized list of critical issues
- Feature Requests: Highly-requested features from the community
- Stale Issues/PRs: Items that may need attention
- Community Health: Engagement metrics
GitAudit supports optional AI-powered sentiment analysis to better prioritize bugs and feature requests:
- Navigate to Settings → General
- Enable "AI Sentiment Analysis"
- Choose your provider (Anthropic Claude or OpenAI GPT)
- Enter your API key
- (Optional) Specify a model name or use defaults
- Test your API key with the "Test API Key" button
Note: AI API calls will incur costs from your chosen provider. Monitor your usage carefully.
gitaudit/
├── client/ # React frontend (TypeScript + Vite)
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── data/ # API clients and React Query hooks
│ │ ├── layouts/ # Page layouts
│ │ ├── pages/ # Application pages
│ │ └── utils/ # Utility functions
│ └── package.json
├── server/ # Node.js backend (Express + SQLite)
│ ├── src/
│ │ ├── db/ # Database setup and queries
│ │ ├── middleware/ # Express middleware
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic and GitHub API
│ │ └── utils/ # Utility functions
│ └── package.json
├── package.json # Root workspace configuration
└── README.md
The backend uses SQLite with better-sqlite3 for data storage. The database file is created automatically on first run at the path specified in DATABASE_PATH.
GitAudit implements smart rate limiting to respect GitHub's API limits:
- Serial request processing (one request at a time)
- Configurable delays between requests
- Automatic retry logic with exponential backoff
- Cooldown periods after rate limit hits
Issue and PR data is synchronized in the background:
- Initial fetch on repository addition
- Incremental updates for existing repositories
- Automatic refresh on user request
- Sentiment analysis runs lazily when viewing specific pages
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Built with @wordpress/components and @wordpress/dataviews
- Uses Vercel AI SDK for AI integration
- Inspired by the need for better issue triage workflows
If you encounter any issues or have questions:
- Check existing GitHub Issues
- Create a new issue with details about your problem
- Include relevant logs and configuration (remove sensitive data)