6 Commits

Author SHA1 Message Date
d830f33eec Release v0.4.1
All checks were successful
Release binary for cl-cli / build-and-release (push) Successful in 1m23s
Check go code / build-and-release (push) Successful in 1m6s
2025-10-25 00:37:21 +02:00
825623c9f3 Fix release workflow (#4)
All checks were successful
Check go code / build-and-release (push) Successful in 1m6s
Reviewed-on: #4
Co-authored-by: Julien Fastré <julien.fastre@champs-libres.coop>
Co-committed-by: Julien Fastré <julien.fastre@champs-libres.coop>
2025-10-24 22:35:21 +00:00
81350f38e4 Update dependencies in Cargo.lock to the latest versions
All checks were successful
Check go code / build-and-release (push) Successful in 1m4s
2025-10-25 00:13:23 +02:00
1f2d42e1d5 Update release workflow to include pull_request_target event and specify branches
All checks were successful
Check go code / build-and-release (push) Successful in 1m3s
2025-10-24 23:43:11 +02:00
a0f67464b5 Simplify build-and-release workflow by switching to akkuman/gitea-release-action and enabling checksum generation.
Some checks failed
Release binary for cl-cli / build-and-release (push) Failing after 7s
2025-10-24 23:41:29 +02:00
ff5699e627 Update workflow to specify branches for push and pull_request events 2025-10-24 23:35:28 +02:00
8 changed files with 1287 additions and 826 deletions

3
.changes/v0.4.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v0.4.1 - 2025-10-25
### Fixed
* Fix dependencies

View File

@@ -20,17 +20,14 @@ jobs:
id: read_release
with:
path: .changes/${{ github.ref_name }}.md
- name: Setup go for using go gitea actions
uses: https://gitea.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Use Go Action to release
id: use-go-action
uses: https://gitea.com/actions/release-action@main
- name: Release
uses: https://gitea.com/akkuman/gitea-release-action@v1
env:
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
with:
files: |-
target/release/cl-cli
config.toml.dist
api_key: '${{secrets.RELEASE_TOKEN}}'
body: |
${{ steps.read_release.outputs.content }}
md5sum: true
sha256sum: true
body_path: .changes/${{ github.ref_name }}.md

View File

@@ -1,8 +1,15 @@
name: Check go code
on:
push: *
pull_request: *
push:
branches:
- '**'
pull_request:
branches:
- '**'
pull_request_target:
branches:
- '**'
jobs:
build-and-release:

View File

@@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
## v0.4.1 - 2025-10-25
### Fixed
* Fix dependencies
## v0.4.0 - 2025-10-24
### Added
* [planning - i2work] Met à jour le body du ticket gitea avec un lien vers le work package, dans une section "related issues"

2041
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -7,12 +7,12 @@ edition = "2021"
[dependencies]
clap = { version = "4.1.13", features = ["derive"] }
gitlab = "0.1607.0"
reqwest = "0.11.23"
serde = { version = "1.0.158", features = ["derive"] }
toml = "0.7.3"
url = "2.3.1"
gitlab = "0.1804.0"
reqwest = "0.12.24"
serde = { version = "1.0.228", features = ["derive"] }
toml = "0.9.8"
url = "2.5.7"
tokio = { version = "1.0.0", features = ["rt", "rt-multi-thread", "macros"] }
simple-home-dir = "0.2.1"
log = "0.4.17"
open = "5.3.1"
simple-home-dir = "0.5.2"
log = "0.4.28"
open = "5.3.2"

View File

@@ -2,13 +2,12 @@ use crate::cli::Issue2Work;
use crate::config::Config;
use crate::error::GeneralError;
use crate::gitlab::client::{client_for_url, has_client_for_url};
use crate::gitlab::issue::IssueBundle;
use crate::gitlab::issue::{Issue, IssueBundle, Project};
use crate::openproject::client::Client;
use crate::openproject::user::{GetMe, User};
use crate::openproject::work::WorkPackageWriterAssignee;
use crate::planning::Issue2WorkActionTrait;
use gitlab::api::{issues, projects, AsyncQuery};
use gitlab::{Issue, Project};
use url::Url;
#[derive(Debug)]
@@ -41,7 +40,7 @@ impl Issue2WorkActionTrait for GitlabAction {
let issue = issues.first().unwrap();
let project_endpoint = projects::Project::builder()
.project(issue.project_id.value())
.project(issue.project_id)
.build()
.unwrap();

View File

@@ -1,5 +1,17 @@
use gitlab::Issue;
use gitlab::Project;
use serde::Deserialize;
#[derive(Clone, Debug, Deserialize)]
pub struct Issue {
pub iid: u64,
pub title: String,
pub web_url: String,
pub project_id: u64,
}
#[derive(Clone, Debug, Deserialize)]
pub struct Project {
pub name_with_namespace: String,
}
/// A struct which contains Issue and Project
#[derive(Debug)]