Giter VIP home page Giter VIP logo

pullkee's Introduction

Pull request icon

pullkee

A simple Pull Requests analyzer.

Release Software License Travis Codecov branch Go Report Card Go Doc Powered By: GoReleaser

Why?

It's always been fun for me to browse pages like this: https://github.com/facebook/react/graphs/contributors.

Although it can't possibly give one a meaningful insight, I've been curious about a number of other metrics in my work project. Who is producing more code? Who's being picked as a reviewer more ofter? How long does it take for us on average to merge a pull request? Who writes more (or longer) comments?

Again, it's not something you can strongly base your decisions on, but it's just plain curiosity. Also, maybe a combination of such metrics could actually mean something.

So, the single purpose of this project is to provide that kind of insights given a Github repository name.

Another great motivator for me was to learn Golang as this project presents a big deal of different challenges.

Install

If you have the Golang environment set up on your computer, just run:

go get github.com/kirillrogovoy/pullkee

and you are all set.

Otherwise, you can manually download the binary from the Releases page. In order to install it automatically, run:

curl https://raw.githubusercontent.com/kirillrogovoy/pullkee/master/godownloader.sh | bash

Usage

Just run pullkee to see the usage. Here's a copy for convenience:

Usage:
    pullkee [flags] [repo]
    repo - Github repository path as "username/reponame"

    Flags:
    --limit - Only use N last pull requests

    Environment variables:
    GITHUB_CREDS - API credentials in the format "username:personal_access_token"

For example, to get the reports for the last 500 merged pull requests of the React repo, run this:

GITHUB_CREDS="your_name:your_key" pullkee --limit 500 facebook/react

API rate limits and cache

Strongly consider using the --limit parameter on big repos since you have a limited number of requests to make to the Github API. For me, it's currently 5000 per 1 hour. Also, always provide the GITHUB_CREDS env var, otherwise you only have 60 requests per 1 hour without it.

Don't have a token yet? Say no more.

That said, pullkee always uses a per-PR local cache in order to avoid repetitive requests for the data of the same pull request.

It means, even if you ran out of requests, you still can wait for them to renew and continue.

Metrics

The current list of metrics is "baked in" into the project and cannot be changed from outside. I'd prefer to keep it that way unless someone is explicitely interested in that.

Just fork the repo to change or add metrics.

Contribute

Please, contribute in any way if you feel like it. Start from the docs to get a high-level overview of the code. Let me know if you can't do something. Keep the test coverage > 95%.

pullkee's People

Contributors

kirillrogovoy avatar schlubbi avatar

Watchers

 avatar  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.