GitHub Analysis demo for Plrx
Simple HTTP wrapper provides GET method, JSON-dict convertion, HTTP Headers reading.
GitHub API wrapper allow to request repository data as objects. Supports pagination.
VCS Repository analysis tool provides following reports:
- Active contributors Top contributors with their number of commit
- Opened and closed pull requests Number of opened and closed pull requests between dates
- Old pull requests Number of old pull requests (not closed within N days)
- Opened and closed issues Number of opened and closed issues between dates
- Old issues Number of old issues (not closed within N days)
Reports can be printed as tables:
Active contributors
-------------------
Login Commit number
maxtepkeev 493
andreiavram 11
or as JSON-like format:
[
{
"name": "Active contributors",
"headers": [
"Login",
"Commit number"
],
"results": [
{
"Login": "maxtepkeev",
"Commit number": 493
},
...
analyzerepo
needs Python 3.7 and can be run with supported Windows or Linux.
First, clone this repo:
$ git clone https://github.com/dm-logv/hr-plrx-github-analysis
$ cd hr-plrx-github-analysis
$ chmod +x analyzerepo
Next, you have two ways.
You can run analyzerepo
as Dockerized CLI application. You need no Python in OS, just Docker.
$ docker build -t analyzerepo . && \
> docker run analyzerepo https://github.com/maxtepkeev/python-redmine
If you have installed Python 3.7 you can run analyzerepo
right now.
$ python analyzerepo https://github.com/maxtepkeev/python-redmine
or
$ ./analyzerepo https://github.com/maxtepkeev/python-redmine
You can get full list of command-line arguments:
analyzerepo -h
Run repo analysis with date bounds:
$ ./analyzerepo -s 2017-01-01 -e 2017-01-31 https://github.com/flutter/flutter
Use BasicAuth (see below):
$ docker run analyzerepo -u dm-logv -p MyPassw https://github.com/maxtepkeev/python-redmine
Forward proxy to Docker and get results as JSON:
$ docker run --env https_proxy=user:passW0rd@proxy.com:3128 \
> analyzerepo --type json https://github.com/dm-logv/aero-stat
- GitHub API limits the number of requests for non-authorized users.
You can you the
--user
and--password
arguments for basic authorization with your account data. - GitHub API strictly recommends getting the next URLs for paginated responses
from headers instead of the URL building.
It makes
analyzerepo
slooow on big repositories with a high number of pull requests or issues. Be patient, please.