Enhance issue handling by adding utils module

Introduce `append_related_issues` function and `IssueRelated` enum to manage related issue linking. Update Gitea action to utilize the new functionality for appending related issues in work package content. Add corresponding tests.
This commit is contained in:
2025-10-24 17:32:10 +02:00
parent c5f4f9fcf9
commit 1af6596b51
3 changed files with 185 additions and 0 deletions
+4
View File
@@ -7,6 +7,7 @@ use crate::openproject::user::{GetMe, User};
use crate::openproject::work::WorkPackageWriter;
use crate::planning::Issue2WorkActionTrait;
use url::Url;
use crate::planning::utils::{append_related_issues, IssueRelated};
pub(crate) struct GiteaAction {}
@@ -37,6 +38,9 @@ impl Issue2WorkActionTrait for GiteaAction {
config.openproject.base_url, args.project_id, work_package.id
);
let content = append_related_issues(&IssueRelated::OpenProjectIssue(url.to_string()), &issue.body);
println!(
"new work package created: {:?}, edit at {}",
work_package.subject, url