8 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
dc0040c2d1 Add workflow to check Go code on push and pull requests 2025-10-24 23:34:15 +02:00
9950282d6e Update build-and-release workflow to use Gitea-hosted setup-go action
Some checks failed
Release binary for cl-cli / build-and-release (push) Failing after 7s
2025-10-24 23:33:31 +02:00
8 changed files with 1303 additions and 824 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 id: read_release
with: with:
path: .changes/${{ github.ref_name }}.md path: .changes/${{ github.ref_name }}.md
- name: Setup go for using go gitea actions - name: Release
uses: https://github.com/actions/setup-go@v4 uses: https://gitea.com/akkuman/gitea-release-action@v1
with: env:
go-version: '>=1.20.1' NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
- name: Use Go Action to release
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with: with:
files: |- files: |-
target/release/cl-cli target/release/cl-cli
config.toml.dist config.toml.dist
api_key: '${{secrets.RELEASE_TOKEN}}' md5sum: true
body: | sha256sum: true
${{ steps.read_release.outputs.content }} body_path: .changes/${{ github.ref_name }}.md

View File

@@ -0,0 +1,25 @@
name: Check go code
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
pull_request_target:
branches:
- '**'
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: https://github.com/actions/checkout@v4
- name: Install rust toolchain
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Build binaries
run: cargo build
- name: Run tests
run: cargo test

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). 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 ## v0.4.0 - 2025-10-24
### Added ### Added
* [planning - i2work] Met à jour le body du ticket gitea avec un lien vers le work package, dans une section "related issues" * [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] [dependencies]
clap = { version = "4.1.13", features = ["derive"] } clap = { version = "4.1.13", features = ["derive"] }
gitlab = "0.1607.0" gitlab = "0.1804.0"
reqwest = "0.11.23" reqwest = "0.12.24"
serde = { version = "1.0.158", features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] }
toml = "0.7.3" toml = "0.9.8"
url = "2.3.1" url = "2.5.7"
tokio = { version = "1.0.0", features = ["rt", "rt-multi-thread", "macros"] } tokio = { version = "1.0.0", features = ["rt", "rt-multi-thread", "macros"] }
simple-home-dir = "0.2.1" simple-home-dir = "0.5.2"
log = "0.4.17" log = "0.4.28"
open = "5.3.1" open = "5.3.2"

View File

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

View File

@@ -1,5 +1,17 @@
use gitlab::Issue; use serde::Deserialize;
use gitlab::Project;
#[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 /// A struct which contains Issue and Project
#[derive(Debug)] #[derive(Debug)]