Actually, does this even work with CloudQuery as the registry?
You’re right, this pulls releases from GitHub and you’d want to pull releases from the CloudQuery registry.
We have a working config for it that we use internally; we just haven’t got around to updating the guide (a contribution would be great though).
See our custom config source in this GitHub link.
Ah, thanks! I will have a poke around.
So the regex in the guide should work. You’d have to add datasourceTemplate: "custom.cloudquery",
and that custom data source:
customDatasources: {
cloudquery: {
defaultRegistryUrlTemplate: "https://api.cloudquery.io/plugins/{{packageName}}/versions",
transformTemplates: [
'{ "releases": $map($.items, function($v) { { "version": $v.name, "releaseTimestamp": $v.published_at, "isDeprecated": $v.retracted, "changelogUrl": $join(["https://hub.cloudquery.io/plugins/", $replace("{{packageName}}", /(.+?)\\/(.+?)\\/(.+)/, "$2/$1/$3/"), $v.name, "/versions"]) } }), "homepage": "https://hub.cloudquery.io" }',
],
},
},
Ah and packageNameTemplate: "cloudquery/{{{ type }}}/{{{ name }}}",
Makes sense. Probably one for Monday! If I get it going, I’ll write something up and send it over.