diff --git a/.changes/unreleased/Fixed and Improvements-20240725-111058.yaml b/.changes/unreleased/Fixed and Improvements-20240725-111058.yaml new file mode 100644 index 00000000000..69da7701b54 --- /dev/null +++ b/.changes/unreleased/Fixed and Improvements-20240725-111058.yaml @@ -0,0 +1,3 @@ +kind: Fixed and Improvements +body: Fix gitlab issues / mrs indexing - description field might be null +time: 2024-07-25T11:10:58.73913-07:00 diff --git a/ee/tabby-webserver/src/service/background_job/third_party_integration/issues.rs b/ee/tabby-webserver/src/service/background_job/third_party_integration/issues.rs index cea76e6d09a..949f381524a 100644 --- a/ee/tabby-webserver/src/service/background_job/third_party_integration/issues.rs +++ b/ee/tabby-webserver/src/service/background_job/third_party_integration/issues.rs @@ -70,7 +70,7 @@ pub async fn list_github_issues( #[derive(Deserialize)] struct GitlabIssue { title: String, - description: String, + description: Option, web_url: String, updated_at: DateTime, } @@ -106,7 +106,7 @@ pub async fn list_gitlab_issues( id: issue.web_url.clone(), link: issue.web_url, title: issue.title, - body: issue.description, + body: issue.description.unwrap_or_default(), }; yield (issue.updated_at, doc); } @@ -130,7 +130,7 @@ pub async fn list_gitlab_issues( id: merge_request.web_url.clone(), link: merge_request.web_url, title: merge_request.title, - body: merge_request.description, + body: merge_request.description.unwrap_or_default(), }; yield (merge_request.updated_at, doc); }