Skip to content

Commit 595e2fc

Browse files
committed
feat: update DigestCron to modify project ID format for MeiliSearch compatibility
1 parent 0d14b8c commit 595e2fc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

api/src/digest/cron.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ export class DigestCron {
8080
runId,
8181
id: project.slug,
8282
});
83+
searchProjectItems.push({
84+
id: project.slug.replace(/[.]/g, "-"), // MeiliSearch doesn't allow dots in ids
85+
title: project.name,
86+
type: "project",
87+
});
8388

8489
let addedRepositoryCount = 0;
8590
try {
@@ -102,11 +107,6 @@ export class DigestCron {
102107
stars: repoInfo.stargazers_count,
103108
id: `${provider}-${repoInfo.id}`,
104109
});
105-
searchProjectItems.push({
106-
id: `${provider}-${repoInfo.id}`,
107-
title: repoInfo.name,
108-
type: "project",
109-
});
110110
addedRepositoryCount++;
111111

112112
const issues = await this.githubService.listRepositoryIssues({

0 commit comments

Comments
 (0)