cl-cli/README.md

56 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2024-01-09 08:41:46 +00:00
# CL-cli utility
Provide a CLI interface for several recurring tasks for Champs-Libres
Currently:
- convert a gitlab issue to a work package
## Install & configure
2024-01-09 08:50:10 +00:00
### Install
2024-01-09 08:41:46 +00:00
Download the most recent binaries at https://gitea.champs-libres.be/julienfastre/cl-cli/releases
Once downloaded, install it:
```
# this will install the command globally with the name "cl-cli"
sudo install cl-cli /usr/local/bin/cl-cli
# this will install the command globally with the name "cl"
sudo install cl-cli /usr/local/bin/cl
```
2024-01-09 08:50:10 +00:00
### Configure
2024-01-09 08:41:46 +00:00
Copy the file [config.toml.dist](./config.toml.dist) as a template, and
save it at the path `$HOME/.config/cl-cli/config.toml`:
```bash
mkdir -p $HOME/.config/cl-cli
cp config.toml $HOME/.config/cl-cli/config.toml
editor $HOME/.config/cl-cli/config.toml
```
2024-01-09 08:50:10 +00:00
Then, fill it with the required configuration options (gitlab and openproject token).
## Usage
### Convert a gitlab issue into a work package
```bash
cl-cli planning i2work https://gitlab.com/Chill-Projet/chill-bundles/-/issues/240 chill
```
Where:
- `https://gitlab.com/Chill-Projet/chill-bundles/-/issues/240` is the URL of the issue
- `chill` is the identifier of the project in openproject (see the identifier
in the URL like the page "Vue globale": https://champs-libres.openproject.com/projects/chill/, or
see it there: https://champs-libres.openproject.com/projects/chill/identifier (Paramètres du projet / changer
l'identifiant (bouton en haut)))