Metadata-Version: 2.1
Name: gitlab-kanban
Version: 0.0.1
Summary: GitLab Kanban Board Command Line Interface
Home-page: https://github.com/rofrano/gitlab-kanban
Author: John Rofrano
Author-email: rofrano@gmail.com
License: Apache
Keywords: gitlab kanban
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.9.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click (==8.1.3)
Requires-Dist: requests (==2.27.1)
Requires-Dist: tqdm (==4.64.0)
Provides-Extra: dev
Requires-Dist: nose (==1.3.7) ; extra == 'dev'
Requires-Dist: pinocchio (==0.4.3) ; extra == 'dev'
Requires-Dist: coverage (==6.3.2) ; extra == 'dev'
Requires-Dist: pylint (==2.13) ; extra == 'dev'
Requires-Dist: flake8 (==4.0.1) ; extra == 'dev'
Requires-Dist: black (==22.3.0) ; extra == 'dev'

# GitLab Kanban Board Command Line Interface

This project provides and command line interface for generating and manipulating Kanban boards on GitLab. It was built to help teams setting up their initial Kanban board with consistent labels and lists. It also has the ability to create stories that track assets.

## Installation

```bash
pip install gitlab-kanban
```

## Usage

You should set the following environment variables so that you don't have to specify them on the command line. This is particularly convenient when working in the same project for a while.


| Parameter| Variable | Description |
|-------|----------|-------------|
| -t/--token | GITLAB_TOKEN | You GitLab authorization token |
| -p/--project | GITLAB_PROJECT | The unique ID for your GitLab project |
| -u/--url | GETLAB_URL | The GitLab url if not the default https://gitlab.com |

By setting those environment variables you can eliminate the need for using `-t`, `-p` on every call.

You can us the `--help` flag to get help on all of the commands.

```text
$ kanban --help

Usage: kanban [OPTIONS] COMMAND [ARGS]...

  GitLab Kanban Board Command Line Interface

Options:
  -t, --token TEXT       GitLab authorization token or set env GITLAB_TOKEN
                         [required]
  -p, --project TEXT     The GitLab project ID or set env GITLAB_PROJECT
                         [required]
  -u, --gitlab-url TEXT  GitLab URL [optional] defaults to https://gitlab.com
  --help                 Show this message and exit.

Commands:
  boards  Create, Get, Update, Delete Kanban Boards
  issues  Create, Get, Update, Delete Issues
  labels  Create, Get, Update, Delete Labels
```

Each command has a series of subcommands to create the various artifacts.

## CSV Formats

These are the fields that are expected in each of the CSV files:

### Labels

The columns for the labels CSV is as follows:

```
"name","description","text_color","color"
```

| Column name | Description |
|-------------|-------------|
| name        | The label name |
| description | A description of the label |
| text_color  | The text color the label |
| color       | The background color the label |

Refer to `./samples` folder for examples

### Boards

Boards in GitLab are a collection of lists that are associated with labels. The format for a board, therefore, is the same as a label. When creating a board you pss in a name for the board and a label.csv file that has the labels for the bard lists. Once this will be created for each label.

Refer to `./samples` folder for examples

### Issues

The columns for the issues CSV is as follows:

```
"title","description","labels"
```

| Column name | Description |
|-------------|-------------|
| title       | The title of the issue |
| description | The body of the issues |
| labels      | A comma separated list of labels to assign to the issue |

Refer to `./samples` folder for examples

## Development setup

This repository contains the configuration files needed by the [Remote Container](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension of [Visual Studio Code](https://code.visualstudio.com/) that can be used with [Docker Desktop](https://www.docker.com/products/docker-desktop) to bring up a complete development environment simply by starting VSCode and choosing **Restart in Container**.  

You can also create a development environment manually using a Python virtual environment (`venv`) and `pip` 

```bash
python3 -m venv .venv
source .env/bin/activate
pip install -e '.[dev]'
```
