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.4.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file pr_analyzer-20.4.tar.gz.

File metadata

  • Download URL: pr_analyzer-20.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for pr_analyzer-20.4.tar.gz
Algorithm Hash digest
SHA256 18a287030665e2af21819b3db6d33e519c2a141645ee3a9873117bb63441ba10
MD5 f0e9879f261bc1025e9562ddc938c9da
BLAKE2b-256 a62a009cb4a5dd2f448d4c58ccb7aac1182fd75795c9a1199baea726f7e93a18

See more details on using hashes here.

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