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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user