This Python script fetches and analyzes GitHub pull requests to determine the average time it takes each user to get an approval.
- Python 3
- GitHub Personal Access Token
- Clone the repository:
git clone https://github.com/m-sanchez-dev/github-average-review-time.git
cd github-average-review-time
- Install dependencies:
pip install -r requirements.txt
Run the main script to fetch and analyze pull request statistics:
python average-time.py
Before running the script, ensure you set the required environment variables:
GITHUB_ACCESS_TOKEN
: Your GitHub Personal Access Token.
GITHUB_REPO_OWNER
: Owner of the GitHub repository.
GITHUB_REPO_NAME
: Name of the GitHub repository.
LATEST_DATE
: The latest date to consider for filtering old pull requests.
export GITHUB_ACCESS_TOKEN="your-token"
export GITHUB_REPO_OWNER="your-username"
export GITHUB_REPO_NAME="your-repo"
export LATEST_DATE="2023-01-01"