

GitHub - kirillrogovoy/pullkee: A simple Pull Requests analyzer
source link: https://github.com/kirillrogovoy/pullkee
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

pullkee
A simple Pull Requests analyzer.
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%.
Recommend
-
9
Building GitHub Pull Requests using Jenkins Pipelines
-
14
Posted by Pascal Widdershoven on 5-11-2013 We at Kabisa...
-
14
A Better Model for Stacked (GitHub) Pull RequestsFriday, 23 April 2021Code review using GitHub pull requests (PRs) is generally pretty decent, but you're going to have trouble with medium-to-large changes, especially when th...
-
6
GitHub Pull Requests with Screenshots Tip #github Jun 29 ...
-
6
Test pull requests with the Try in Web IDE GitHub action Skip to main content Web-based, cloud-hosted...
-
14
If you develop software, there’s a good chance you use a platform like GitHub to collaborate and work together on code with your team. The basic unit of reviewable code in GitHub is the pull request, but the implementation of a feature may re...
-
4
Copy link Member arcz commented
-
6
Algolia Analyzer browser extension: Inspect Algolia-specific requests in DevToolsAug 4th 2022 engineering
-
6
Conversation Contributor This a...
-
6
Simple Tips on Reviewing Pull Requests Effectively
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK