anderaus / RepoStats

Command line tool to collect git repository statistics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RepoStats

Simple .NET Core console application for collecting statistics from a set of remote git repositories. Meant used for developer KPI reporting.

Features

  • Most recent commit for each repo (repo staleness)
  • Number of commits per contributor
  • Number of unique contributors last X months (human coverage)
  • Any suggestions?

How to use

Clone, build, edit appsettings.json and run:

dotnet run --username {username} --password {password}

Configuration

Example appsettings.json content:

{
  "username": "{username}",
  "password":  "{password}", 
  "repos": [
    {
      "url": "http://something.something.git",
      "friendlyName": "My fine nuget"
    },
    {
      "url": "http://otherthing.otherthing.git",
      "friendlyName": "My fine service"
    }
  ],
  "authorEmailAliases": [
    {
      "primary": "post@andersaustad.com",
      "aliases": [ "anderaus@gmail.com", "anders.austad@novanet.no", "anderaus@outlook.com" ]
    }
  ]
}

Status

Incomplete proof-of-concept using libgit2. Currently clones/fetches repos, loops through commits and collects some key stats. Simple visualization of staleness and coverage using chart.js.

Todos

  • Read auth and repos info from config file or command line
  • Clone/fetch remote repos
  • Gather basic statistics from repos
  • Gather advanced statistics from repos
  • Use configured email aliases to find unique contributors (some contribute using multiple emails)
  • Persist key statistics to json file
  • Create basic static html page visualizing the result
  • Create more advanced html page visualizing the result using chart.js

About

Command line tool to collect git repository statistics

License:MIT License


Languages

Language:C# 74.2%Language:JavaScript 18.6%Language:HTML 5.8%Language:CSS 1.3%