Metadata-Version: 2.1
Name: prman
Version: 0.1.3
Summary: Command line tool for automatic GitLab PR creation.
Home-page: https://github.com/ilyalatt/prman
Author: Ilya Latushko
Author-email: ilyalatt@gmail.com
License: Unlicense
Platform: UNKNOWN
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: brigit (==1.3.0)
Requires-Dist: certifi (==2019.9.11)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: colorama (==0.4.1)
Requires-Dist: docopt (==0.6.2)
Requires-Dist: idna (==2.8)
Requires-Dist: log-colorizer (==1.8.6)
Requires-Dist: pyrecord (==1.0.1)
Requires-Dist: python-gitlab (==1.12.1)
Requires-Dist: requests (==2.22.0)
Requires-Dist: six (==1.12.0)
Requires-Dist: toolz (==0.10.0)
Requires-Dist: urllib3 (==1.25.6)

# PR Man!

## TLDR

```
> prman
The repo name: simulation
The project id: oilrig/simulation
The current branch: f/GOL-123-some-description
Fetching PR's...
Fetching approvers...
Select approvers:
1. jfisher (Jared Fisher)
2. choiii (Peyton Choi)
3. ldavid (Lemar David)
> fisher;choi
Pushing to the origin...
Creating the PR...
The PR is created: https://gitlab.com/oilrig/simulation/merge_requests/42
```

## Why?

Creating a PR in GitLab UI takes so much time.
You need to click a button, select options like 'Squash', 'Remove source branch when merged'.
You need to select minimal approvers count.
You need to select approvers.
You should set approvers as assignee to give them email about your PR.

It is a pure nightmare.
Just run `prman` in your repo directory.
Type approvers like `fisher;choi`.
It pushes your branch to the origin automatically.
A Pull Request is done!

## How to install it?

* Install [pipx](https://pipxproject.github.io/pipx/).
It is like a pip+venv for CLI apps.
`python3 -m pip install --user pipx`.
* `pipx install prman`.
* Go to [GitLab Access Tokens UI](https://gitlab.com/profile/personal_access_tokens).
* Name: `prman`; Scopes: `api`; Create personal access token.
* `prman config set gitlab.token YOUR_TOKEN` (a config is stored in `~/.prman/config.json`).

## How to select approvers?

* You can type a substring of an item by a query like `fisher`.
* You can type multiple items separated by `;` like in a query `fisher;choi`.
* You can select item by index with a query like `3`.
* You can select an index range with a query like `3..5`.
* Parts of a query can intersects like `2;1..3;fisher`.


