mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 17:45:53 +01:00
Fix skills store PR verification failures
This commit is contained in:
1 parent
30c57ebd5f
commit
b46797f4ba
3 files changed
+27
-2
No files matched your search
@@ -54,6 +54,20 @@ const companySkill = {
|
||||
trustLevel: "markdown_only",
|
||||
compatibility: "compatible",
|
||||
fileInventory: [{ path: "SKILL.md", kind: "skill" }],
|
||||
iconUrl: null,
|
||||
color: null,
|
||||
tagline: null,
|
||||
authorName: null,
|
||||
homepageUrl: null,
|
||||
categories: [],
|
||||
sharingScope: "private",
|
||||
publicShareToken: null,
|
||||
forkedFromSkillId: null,
|
||||
forkedFromCompanyId: null,
|
||||
starCount: 0,
|
||||
installCount: 1,
|
||||
forkCount: 0,
|
||||
currentVersionId: null,
|
||||
metadata: {
|
||||
sourceKind: "catalog",
|
||||
catalogId: catalogSkill.id,
|
||||
|
||||
@@ -2770,13 +2770,19 @@ function buildManifestFromPackageFiles(
|
||||
const trackingRef = asString(primarySource?.trackingRef);
|
||||
const sourceHostname = asString(primarySource?.hostname) || "github.com";
|
||||
const [owner, repoName] = (repo ?? "").split("/");
|
||||
const canonicalKey = readSkillKey(frontmatter);
|
||||
const normalizedSourceKind = owner === "paperclipai"
|
||||
&& repoName === "paperclip"
|
||||
&& canonicalKey?.startsWith("paperclipai/paperclip/")
|
||||
? "paperclip_bundled"
|
||||
: "github";
|
||||
sourceType = "github";
|
||||
sourceLocator = asString(primarySource?.url)
|
||||
?? (repo ? `https://${sourceHostname}/${repo}${repoPath ? `/tree/${trackingRef ?? commit ?? "main"}/${repoPath}` : ""}` : null);
|
||||
sourceRef = commit;
|
||||
normalizedMetadata = owner && repoName
|
||||
? {
|
||||
sourceKind: "github",
|
||||
sourceKind: normalizedSourceKind,
|
||||
...(sourceHostname !== "github.com" ? { hostname: sourceHostname } : {}),
|
||||
owner,
|
||||
repo: repoName,
|
||||
|
||||
@@ -910,13 +910,18 @@ function deriveImportedSkillSource(
|
||||
: null);
|
||||
const [owner, repoName] = (repo ?? "").split("/");
|
||||
if (repo && owner && repoName) {
|
||||
const sourceKind = owner === "paperclipai"
|
||||
&& repoName === "paperclip"
|
||||
&& canonicalKey?.startsWith("paperclipai/paperclip/")
|
||||
? "paperclip_bundled"
|
||||
: "github";
|
||||
return {
|
||||
sourceType: "github",
|
||||
sourceLocator: url,
|
||||
sourceRef: commit,
|
||||
metadata: {
|
||||
...(canonicalKey ? { skillKey: canonicalKey } : {}),
|
||||
sourceKind: "github",
|
||||
sourceKind,
|
||||
...(sourceHostname !== "github.com" ? { hostname: sourceHostname } : {}),
|
||||
owner,
|
||||
repo: repoName,
|
||||
|
||||
Reference in new issue
Block a user