Skip to content

For all merged PRs in a github repo, calculate the following: Time to Merge, Cycle Time, PR Size

License

Notifications You must be signed in to change notification settings

davycheung/github-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Pull Metrics

License

Python library to extract pulls from a github repository and calculate the following metrics on each pull: Cycle Time, Time to Merge, Diff Size

The data is written onto pull_requests.csv and is found in the script's directory.

Install

pip install -r requirements.txt

Setup

List the GitHub login users whose pulls we want to extract.

USERS_TO_TRACK = [
    "SOME_GITHUB_LOGIN_USER",
]

Add a GitHub token

GITHUB_API_TOKEN = "github_pat_some_token"

Add a GitHub full repo name (including organization)

REPO_NAME = "laravel/docs"

Run Script

Note: tested on python 3.8

Only extract pulls for users specified in USERS_TO_TRACK:

python main.py

Extract pulls for all users:

python main.py -a

Extract pulls for all users that were created after 2023-Jun-01.

python main.py -a -d=20230601

About

For all merged PRs in a github repo, calculate the following: Time to Merge, Cycle Time, PR Size

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages