A sample application that analyzes GitHub repository issues using AI, extracts common themes, and helps prioritize development work.
This application uses environment variables for sensitive configuration such as API keys. We use .env files to manage these variables locally, which are not committed to the repository for security reasons.
-
Create a
.envfile in the following directories:src/Samples/GitHubIssueAnalysis/GitHubIssueAnalysis.Client/src/Samples/GitHubIssueAnalysis/GitHubIssueAnalysis.Silo/
-
Example
.envfile for the client:
# GitHub API Configuration
GITHUB_PERSONAL_ACCESS_TOKEN=your_github_token_here
- Example
.envfile for the silo:
# Google Gemini Configuration
GOOGLE_GEMINI_API_KEY=your_gemini_key_here
GOOGLE_GEMINI_MODEL=gemini-2.0-flash
# GitHub API Configuration
GITHUB_PERSONAL_ACCESS_TOKEN=your_github_token_here
# Use Fallback LLM when API keys are missing
USE_FALLBACK_LLM=true
- Never commit
.envfiles to your repository - The
.envfiles are included in.gitignoreto prevent accidental commits - If no API keys are provided, the application will use a fallback LLM service that provides basic responses
- Start the Silo server:
cd src/Samples/GitHubIssueAnalysis/GitHubIssueAnalysis.Silo/
dotnet run
- In a separate terminal, start the Client:
cd src/Samples/GitHubIssueAnalysis/GitHubIssueAnalysis.Client/
dotnet run
- Follow the prompts in the client to analyze GitHub repositories.
The application uses the following configuration sources in order of precedence:
- Environment variables (from
.envfiles or system environment) - appsettings.json
- Default values
The application is configured to use:
- Google Gemini as the primary LLM service (when API key is provided)
- A fallback service when no API keys are available or in case of errors
- Analyze open and closed issues from GitHub repositories
- Extract common themes and categorize issues
- Generate recommendations based on issue analysis
- Visualize issue statistics with percentage graphs
- Support for filtering issues by state (open/closed/all)
The application uses:
- .NET for the application framework
- Orleans for distributed computing and actor model
- Memory streams for communication between components
- Serilog for structured logging
- Google Gemini API for AI analysis