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) <noreply@anthropic.com>
This commit is contained in:
@@ -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}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user