fork: route Gitea skills through owner/repo canonical-key path
Build: Dev / build (push) Successful in 5m20s
Build: Dev / update-infra (push) Successful in 0s

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) <noreply@anthropic.com>
This commit is contained in:
2026-06-10 07:05:07 -04:00
parent 33ab4f8cdd
commit 59dc05bdbc
+10 -1
View File
@@ -398,7 +398,16 @@ function deriveCanonicalSkillKey(
const owner = normalizeSkillSlug(asString(metadata?.owner)); const owner = normalizeSkillSlug(asString(metadata?.owner));
const repo = normalizeSkillSlug(asString(metadata?.repo)); 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}`; return `${owner}/${repo}/${slug}`;
} }