Giter Club home page Giter Club logo

gh-metrics's Introduction

gh-metrics

A command line tool that calculates pull-request and issue metrics given a GitHub repository

Usage

Create a personal GitHub token with the scopes repo.

Run the tool using npx:

GITHUB_TOKEN=<yout-token> npx @figify/gh-metrics --a <account org or user> --r <repository name>

or straight:

npx @figify/gh-metrics --a <account org or user> --r <repository name>

if you have a GITHUB_TOKEN environment variable already set.

Example for a dependency used:

GITHUB_TOKEN=<yout-token> npx @figify/gh-metrics --a sindresorhus --r ora

Metrics

The following metrics are calculated:

  • Average Time to Close (in days, does not account for issues closed and re-opened)
  • Average Comments per Issue
  • Average Time to Merge (in days)
  • Average Comments per PR (Open, Closed or Merged)
  • Average Comments per PR (Closed or Merged)
  • Average Reviews per PR (Closed or Merged)
  • Average Interactions (comments, reviews, review comments) per PR (Closed or Merged)

Maintainer

Kyriakos Chatzidimitriou

Roadmap

  • Add GitHub Actions
  • Add some testing
  • Publish both to npm and GitHub registries
  • Do the calculations in memory instead of storing in memory everything
  • Store in csv/json files option
  • Option to calculate only issues or only PR metrics
  • Create a mini-site

Contributing

TODO

Publishing guide

Example because I forget:

  • git tag -a v0.1.0 -m "Version 0.1.0 - First working version"
  • git push origin v0.1.0
  • npm publish --access public --dry-run

License

MIT

gh-metrics's People

Contributors

kyrcha avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.