This repository contains scripts that create statistics for an organization that is using Github. It is assumed that SAML is used to give the organization's employees access.
A personal access token
needs to be created that is authorized to be used with the organization.
The permission scope of this token needs to be repo
, admin:org
and user
.
The scripts read the configuration file github.ini
.
It contains this token and the name of the organization.
The file github.ini.example
can be used as reference to understand the syntax.
The python environment should be setup with the command
$ pip install -r requirements.txt
This script fetches all users that are part of the organization and that were authenticated via SAML.
For each user it counts the number of pull requests in each of the last 12 months
and writes the result into the file user-prs.json
.
This script reads the file user-prs.json
and converts it into an Excel spreadsheet
called prs.xlsx
.