This repository provides scripts and workflow to record analytics for a given organization on GitHub itself.
It tracks stars and forks for all public repositories in the organization, generates csv reports and charts by updating the data daily.
git clone https://github.com/drawdb-io/gh-analytics.git
Add your GitHub token to .env
according to .env.sample
Customize the config
const config = {
organization: "drawdb-io", // organization name
reportOutputDir: "reports", // directory to place the reports in
chartOutputDir: "charts", // directory to place the charts in
trackedPeriod: 365, // the number of records to keep
chartSettings: {
width: 960, // chart image width
height: 600, // chart image height
backgroundColour: "", // chart background color, transparent by default
},
};
npm install
npm start
npm start
calls npm generateReports.js
to generate the csv reports and npm generateCharts.js
that reads the reports and generated charts.