You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 450db7e
Browse filesBrowse the repository at this point in the historyBrowse files
return`INSERT INTO skill_generated(owner,repo,name,kind,sha,payload,generated_at) SELECT owner,repo,name,${quote(kind)},current_sha,${quote(JSON.stringify(payload))},${quote(reviewedAt)} FROM skills WHERE owner=${quote(source.owner)} AND repo=${quote(source.repo)} AND name=${quote(source.name)} AND current_sha=${quote(source.sourceBlobSha)} AND rendered_raw_sha256=${quote(source.rawSha256)} AND rendered_status='ok' ON CONFLICT(owner,repo,name,kind) DO NOTHING;`
94
+
constidentity=`owner=${quote(source.owner)} AND repo=${quote(source.repo)} AND name=${quote(source.name)}`
95
+
constcurrent=`current_sha=${quote(source.sourceBlobSha)} AND rendered_raw_sha256=${quote(source.rawSha256)} AND rendered_status='ok' AND json_valid(rendered_frontmatter) AND json_extract(rendered_frontmatter,'$.description')=${quote(source.description)}`
96
+
consthistorical=`EXISTS(SELECT 1 FROM skill_description_history WHERE ${identity} AND raw_sha256=${quote(source.rawSha256)} AND source_blob_sha=${quote(source.sourceBlobSha)} AND json_extract(frontmatter,'$.description')=${quote(source.description)})`
97
+
return`INSERT INTO skill_generated(owner,repo,name,kind,sha,payload,generated_at) SELECT owner,repo,name,${quote(kind)},${quote(source.sourceBlobSha)},${quote(JSON.stringify(payload))},${quote(reviewedAt)} FROM skills WHERE ${identity} AND ((${current}) OR ${historical}) ON CONFLICT(owner,repo,name,kind) DO NOTHING;`
awaitfixture.db.prepare(`INSERT INTO skills(owner,repo,name,display_name,slug,current_sha,rendered_raw_sha256,rendered_status) VALUES ('author','skills','review','Review','author/review',?,?,'ok')`).bind(source.sourceBlobSha,source.rawSha256).run()
40
+
awaitfixture.db.prepare(`INSERT INTO skills(owner,repo,name,display_name,slug,current_sha,rendered_raw_sha256,rendered_status,rendered_frontmatter) VALUES ('author','skills','review','Review','author/review',?,?,'ok',?)`).bind(source.sourceBlobSha,source.rawSha256,JSON.stringify({description: source.description})).run()
0 commit comments