A comprehensive analytics and reporting system for tracking GitHub repository contributions, generating insights, and creating static contributor profile pages.
Website | Discord | DAO |
elizaos/eliza permalinks:
older versions are backed up in data/*/history
folders with timestamps
export GH_ACCESS_TOKEN=”your_token”
export OPENAI_API_KEY=”your_key”
2. Install Dependencies:
```bash
# Install Python dependencies
pip install openai langchain-core langchain-ollama
# Install Node.js dependencies
npm install
# Update repository details in fetch_github.sh
owner="your_org"
repo="your_repo"
# Fetch recent activity
./scripts/fetch_github.sh owner repo --type prs --days 7
./scripts/fetch_github.sh owner repo --type issues --days 7
./scripts/fetch_github.sh owner repo --type commits --days 7
# Process and combine data
python scripts/combine.py -p data/prs.json -i data/issues.json -c data/commits.json -o data/combined.json
# Calculate contributor scores
python scripts/calculate_scores.py data/combined.json data/scored.json
# Generate summaries
python scripts/summarize.py data/scored.json data/contributors.json --model openai
The included GitHub Actions workflow (weekly-summaries.yml
) automatically:
# Build and generate contributor profile pages
npm run build
npm run generate
# View the site
open profiles/index.html
The system generates structured JSON data for contributors:
{
"contributor": "username",
"score": number,
"avatar_url": "string",
"summary": "string",
"activity": {
"code": {
"total_commits": number,
"total_prs": number,
"commits": array,
"pull_requests": array
},
"issues": {
"total_opened": number,
"opened": array
},
"engagement": {
"total_comments": number,
"comments": array
}
}
}
calculate_scores.py
summarize.py
ContributorProfile.js
weekly-summaries.yml
.
├── data/ # Generated data and reports
├── scripts/ # Core processing scripts
│ ├── combine.py # Data aggregation
│ ├── calculate_scores.py # Scoring system
│ └── summarize.py # Summary generation
├── profiles/ # Generated static site
└── .github/workflows # Automation workflows