Compare commits

..

5 Commits

Author SHA1 Message Date
606486c3fe Release v0.5.0
All checks were successful
Release binary and debian package for cl-cli / webext-build (push) Successful in 3m10s
Release binary and debian package for cl-cli / build-and-release (push) Successful in 1m51s
2025-11-13 12:47:07 +01:00
0b9099d2d3 add missing changie 2025-11-13 12:42:56 +01:00
af1b805616 Set up native messaging with debian packages (#6)
All checks were successful
Check go code / build-and-release (push) Successful in 1m2s
Reviewed-on: #6
Co-authored-by: Julien Fastré <julien.fastre@champs-libres.coop>
Co-committed-by: Julien Fastré <julien.fastre@champs-libres.coop>
2025-11-13 11:39:38 +00:00
9439f6afe1 configure changie to update version on release
All checks were successful
Check go code / build-and-release (push) Successful in 1m5s
2025-11-12 20:12:44 +01:00
0a64db6925 Add a web extension and debian package compilation (#5)
All checks were successful
Check go code / build-and-release (push) Successful in 1m9s
Reviewed-on: #5
Co-authored-by: Julien Fastré <julien.fastre@champs-libres.coop>
Co-committed-by: Julien Fastré <julien.fastre@champs-libres.coop>
2025-11-12 19:10:41 +00:00
10 changed files with 75 additions and 22 deletions

4
.changes/v0.5.0.md Normal file
View File

@@ -0,0 +1,4 @@
## v0.5.0 - 2025-11-13
### Added
* Add a web extension
* Install using package manager, with CI generating the package

View File

@@ -25,8 +25,14 @@ newlines:
endOfVersion: 1 endOfVersion: 1
envPrefix: CHANGIE_ envPrefix: CHANGIE_
# update the version in the cargo file, on release # update the version in relevant files
replacements: replacements:
- path: Cargo.toml - path: Cargo.toml
find: '^version = ".*"' find: '^version = ".*"'
replace: 'version = "{{.VersionNoPrefix}}"' replace: 'version = "{{.VersionNoPrefix}}"'
- path: web-extension/cl/manifest.json
find: '"version": ".*"'
replace: '"version": "{{.VersionNoPrefix}}"'
- path: web-extension/cl/package.json
find: '"version": ".*"'
replace: '"version": "{{.VersionNoPrefix}}"'

View File

@@ -6,6 +6,11 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie). and is generated by [Changie](https://github.com/miniscruff/changie).
## v0.5.0 - 2025-11-13
### Added
* Add a web extension
* Install using package manager, with CI generating the package
## v0.4.1 - 2025-10-25 ## v0.4.1 - 2025-10-25
### Fixed ### Fixed
* Fix dependencies * Fix dependencies

2
Cargo.lock generated
View File

@@ -174,7 +174,7 @@ dependencies = [
[[package]] [[package]]
name = "cl-cli" name = "cl-cli"
version = "0.5.0-alpha15" version = "0.5.0"
dependencies = [ dependencies = [
"clap", "clap",
"gitlab", "gitlab",

View File

@@ -1,8 +1,8 @@
[package] [package]
name = "cl-cli" name = "cl-cli"
version = "0.5.0-alpha15" version = "0.5.0"
edition = "2021" edition = "2021"
license = "GPLv3" license = "GPL-3.0-or-later"
description = "Some helpers scripts for Champs-Libres" description = "Some helpers scripts for Champs-Libres"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -30,12 +30,12 @@ serde_json = "1.0.145"
[package.metadata.deb] [package.metadata.deb]
maintainer = "Julien Fastré <julien.fastre@champs-libres.coop>" maintainer = "Julien Fastré <julien.fastre@champs-libres.coop>"
copyright = "AGPLv3"
extended-description = """Helpers for Champs-Libres""" extended-description = """Helpers for Champs-Libres"""
depends = "$auto" depends = "$auto"
section = "utility" section = "utility"
priority = "optional" priority = "optional"
assets = [ assets = [
["target/release/cl-cli", "usr/bin/cl", "755"], ["target/release/cl-cli", "usr/bin/cl", "755"],
["target/release/webext", "usr/bin/", "755"], ["target/release/webext", "usr/bin/cl-webext", "755"],
["web-extension/_native-messaging/cl_cli.json", "/usr/lib/mozilla/native-messaging-hosts/", "644"]
] ]

View File

@@ -6,23 +6,49 @@ Currently:
- convert a gitlab issue to a work package - convert a gitlab issue to a work package
## Install & configure ## Install
### Install There are two components to install:
Download the most recent binaries at https://gitea.champs-libres.be/julienfastre/cl-cli/releases - a firefox add-ons;
- some binaries on the host machine
Once downloaded, install it: ### Install firefox add-on
``` Using firefox, download the `.xpi` file from the [release page](https://gitea.champs-libres.be/julienfastre/cl-cli/releases) of the `julienfastre/cl-cli` repository.
# 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" ### Install cl-cli binaries
sudo install cl-cli /usr/local/bin/cl
#### Using package manager
A debian package is published and stored on gitea.
```bash
# download the gpg key
sudo curl https://gitea.champs-libres.be/api/packages/julienfastre/debian/repository.key -o /etc/apt/keyrings/gitea-julienfastre.asc
# add the package repository. You must adapt the $distribution (see below)
echo "deb [signed-by=/etc/apt/keyrings/gitea-julienfastre.asc] https://gitea.champs-libres.be/api/packages/julienfastre/debian $distribution main" | sudo tee -a /etc/apt/sources.list.d/gitea.list
# update
sudo apt update
# install
sudo apt install cl-cli
``` ```
### Configure Available distributions:
- Ubuntu 24..04: noble
- Ubuntu 25.04: plucky
- Ubuntu: 25.10: questing
**Note:** The package is very simple, there are very few dependencies, and there isn't any difference between them for now.
## Configure
Copy the file [config.toml.dist](./config.toml.dist) as a template, and Copy the file [config.toml.dist](./config.toml.dist) as a template, and
save it at the path `$HOME/.config/cl-cli/config.toml`: save it at the path `$HOME/.config/cl-cli/config.toml`:
@@ -33,14 +59,19 @@ cp config.toml $HOME/.config/cl-cli/config.toml
editor $HOME/.config/cl-cli/config.toml editor $HOME/.config/cl-cli/config.toml
``` ```
Then, fill it with the required configuration options (gitlab and openproject token). Then, fill it with the required configuration options:
- gitea personal access token:
![configuration screenshort](./docs/configuration/gitea_screenshot_configure_pat.png)
- Gitlab: [Create an access token](https://gitlab.com/-/user_settings/personal_access_tokens?name=cl-cli&scopes=api,read_user) With the "api" and "read_user" scopes
- [Openproject](https://champs-libres.openproject.com/my/access_tokens)
## Usage ## Usage as CLI
### Convert a gitlab issue into a work package ### Convert a gitlab issue into a work package
```bash ```bash
cl-cli planning i2work https://gitlab.com/Chill-Projet/chill-bundles/-/issues/240 chill cl-cli planning i2work https://gitlab.com/Chill-Projet/chill-bundles/-/issues/240 chill
``` ```

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -0,0 +1,7 @@
{
"name": "cl_cli",
"description": "Call cl-cli from browser",
"path": "/usr/bin/cl-webext",
"type": "stdio",
"allowed_extensions": ["helper@champs-libres-coop"]
}

View File

@@ -1,7 +1,7 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "Champs-Libres Helper", "name": "Champs-Libres Helper",
"version": "0.4", "version": "0.5.0",
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
"id": "helper@champs-libres-coop", "id": "helper@champs-libres-coop",

View File

@@ -1,6 +1,6 @@
{ {
"name": "web-extension", "name": "web-extension",
"version": "0.4.0", "version": "0.5.0",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@@ -12,7 +12,7 @@
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",
"license": "ISC", "license": "GPL-3.0-or-later",
"type": "commonjs", "type": "commonjs",
"devDependencies": { "devDependencies": {
"@types/firefox-webext-browser": "^143.0.0", "@types/firefox-webext-browser": "^143.0.0",