mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-29 04:25:52 +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
@@ -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