From 59dc05bdbc0a9da42e18c59be023f8ad4a57fe07 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Wed, 10 Jun 2026 07:05:07 -0400 Subject: [PATCH] fork: route Gitea skills through owner/repo canonical-key path deriveCanonicalSkillKey only emitted the owner/repo-based key for github and skills_sh sources, so Gitea skills fell through to the generic company/{companyId}/{slug} branch. Add gitea to the sourceType / sourceKind clause so a Gitea skill at git.example.com/owner/repo gets key owner/repo/{slug}, matching the GitHub format. Existing imports keep their old keys until re-imported. Co-Authored-By: Claude Opus 4.7 (1M context) --- server/src/services/company-skills.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/src/services/company-skills.ts b/server/src/services/company-skills.ts index 67cd2bda..c6b6946e 100644 --- a/server/src/services/company-skills.ts +++ b/server/src/services/company-skills.ts @@ -398,7 +398,16 @@ function deriveCanonicalSkillKey( const owner = normalizeSkillSlug(asString(metadata?.owner)); const repo = normalizeSkillSlug(asString(metadata?.repo)); - if ((input.sourceType === "github" || input.sourceType === "skills_sh" || sourceKind === "github" || sourceKind === "skills_sh") && owner && repo) { + if ( + (input.sourceType === "github" + || input.sourceType === "skills_sh" + || input.sourceType === "gitea" + || sourceKind === "github" + || sourceKind === "skills_sh" + || sourceKind === "gitea") + && owner + && repo + ) { return `${owner}/${repo}/${slug}`; }