Skip to main content

Small CLI to analyze PRs on the GitHub

Project description

PR Analyzer

Imagine that you work on a project, and your Pull Requests don't get reviewed fast enough. Is it just that odds were against you, or in this project Pull Requests are usually not reviewed in a timely fashion?

PR Analyzer is a small set of command line utilities for analyzing Pull Requests in the GitHub, and it should help you to find an answer for the question above.

Using PR Analyzer you will be able:

  • Find out the list of open pull requests
  • Get the statistics about lead time, time before a first comment for the Pull Requests in the repo
  • Generate some nice reports from this statistics, or export this into other systems

Note: Please be aware that the tool is currently under active development.

Installation

You can install pr_analyzer using pip:

$ pip install pr-analyzer

GitHub token is required for the pr_analyzer to be able to use GitHub API:

$ set GITHUB_TOKEN=your_token_value

Available commands

list_prs

usage: list_prs [-h] [--created [created]] [--updated [updated]] [--top [top]]
                url [url ...]

Prints list of open pull requests for given repositories

positional arguments:
  url                  repository url

optional arguments:
  -h, --help           show this help message and exit
  --created [created]  If given - will show PRs created more than `created`
                       days ago
  --updated [updated]  If given - will show PRs updated more than `updated`
                       days ago
  --top [top]          If given - returns up to `top` PRs starting from the
                       oldest

print_stats

usage: print_stats [-h] url [url ...]

Prints statistics about pull requests activity for given repositories

positional arguments:
  url         repository url

optional arguments:
  -h, --help  show this help message and exit

GitHub CI

Azure Pipeline

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pr_analyzer-20.2.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page