diff --git a/src/gitea/action.rs b/src/gitea/action.rs index 7b2d71c..edd5aaf 100644 --- a/src/gitea/action.rs +++ b/src/gitea/action.rs @@ -47,7 +47,7 @@ impl Issue2WorkActionTrait for GiteaAction { fn create_work_package_from_issue(issue: &Issue, assignee: Option) -> WorkPackageWriter { WorkPackageWriter { - subject: format!("{} ({})", issue.title, issue.repository.full_name), + subject: format!("{} ({}/{})", issue.title, issue.repository.full_name, issue.number), work_type: "TASK".into(), description: crate::openproject::work::DescriptionWriter { format: "markdown".into(), diff --git a/src/gitea/client.rs b/src/gitea/client.rs index 89c4424..5d0d600 100644 --- a/src/gitea/client.rs +++ b/src/gitea/client.rs @@ -54,7 +54,7 @@ impl Client { pub async fn get(&self, url: Url) -> Result { let mut headers = HeaderMap::new(); - headers.append(AUTHORIZATION, self.token.parse()?); + headers.append(AUTHORIZATION, format!("token {}", self.token).parse()?); headers.append(ACCEPT, "application/json".parse()?); let client = ClientBuilder::new() diff --git a/src/gitea/issue.rs b/src/gitea/issue.rs index 63ab1c8..40d0397 100644 --- a/src/gitea/issue.rs +++ b/src/gitea/issue.rs @@ -7,7 +7,7 @@ use url::Url; #[derive(Debug, Deserialize)] pub struct Issue { pub id: u64, - number: u64, + pub number: u64, pub title: String, pub body: String, pub repository: Repository,