Metadata-Version: 2.1
Name: github-stats
Version: 0.0.1
Summary: Command line tool to get number of PRs reviewed by a user
Home-page: https://github.com/saiyalamarty/github-stats
Author: Sai Yalamarty
Author-email: sai1494@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# Github Stats [![Python Versions](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/) [![GitHub](https://img.shields.io/github/license/saiyalamarty/gitstats.svg)](https://github.com/saiyalamarty/gitstats/blob/develop/LICENSE)

Command line tool to get number of PRs reviewed by a user.

## Usage
Use `--help` to see all options.
```
$ gitstats --help
Usage: gitstats [OPTIONS]

  This script will print the number of PRs reviewed by the user in the last
  two weeks.

Options:
  -t, --token TEXT     Github token
  -u, --username TEXT  Github username
  -o, --org TEXT       Github org
  -r, --repos TEXT     ',' separated github repos
  --help               Show this message and exit.
```

The script can by default attempts to read the options from the environment variables. Set the following environment variables:

* `GITHUB_TOKEN` - GitHub token
* `GITHUB_USERNAME` - GitHub username
* `GITHUB_ORGANIZATION` - GitHub organization
* `GITHUB_REPOS` - Comma separated list of GitHub repositories

If the environment variables are not set, the script will prompt for the values.

When the script is run, it will print the number of PRs reviewed by the user in the last two weeks.

```
$ gitstats
Repos ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2/2 • 0:00:06 0:00:00


╭───┬───────────┬─────────────────────────────────────────────────────────────────────┬───────╮
│   │ Repo      │ PR Title                                                            │ PR ID │
├───┼───────────┼─────────────────────────────────────────────────────────────────────┼───────┤
│ 0 │ gitrepo_1 │ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiu │ 101   │
│ 1 │ gitrepo_2 │ Lorem ipsum dolor sit amet, consectetur adipiscing elit,            │ 100   │
╰───┴───────────┴─────────────────────────────────────────────────────────────────────┴───────╯

                                   PRs reviewed this week: 2


```


