CKAN
CKAN copied to clipboard
[Feature] GitLab kref for Netkan
Netkan currently supports directly querying mods from GitHub with this format:
"$kref": "#/ckan/github/HebaruSan/Astrogator",
The best known alternative to GitHub is GitLab. Currently I don't know of any KSP mods hosted on GitLab, but it could happen any day now. It would be nice if we could support it with something like:
"$kref": "#/ckan/gitlab/HebaruSan/Astrogator",
GitLab's API docs are here:
- https://docs.gitlab.com/ee/api/README.html
Apparently they treat releases as just a kind of tag, like GitHub but even moreso:
- https://docs.gitlab.com/ee/workflow/releases.html
Looks like there may not be support for a discrete list of assets, since they show the download as a manually entered link in markdown. However, the example link goes to a relative link starting at /uploads/
, so it looks like GitLab does support hosting releases.
This one's on GitLab:
- https://forum.kerbalspaceprogram.com/index.php?/topic/191660-kspremotebeta-control-ksp-aircraft-with-your-phone/
- https://gitlab.com/djdisodo/kspremote/-/releases
KSRSS, too:
- https://forum.kerbalspaceprogram.com/index.php?/topic/192818-beta-ksrss-07-kerbin-or-x25-sized-rss/
- https://gitlab.com/ksrss/KSRSS/-/releases
$ curl -s 'https://gitlab.com/api/v4/projects/Ailex-%2Fstarilex-mk1-iva/releases' | jq
[
{
"name": "MK1 Pod ''Needle' V 1.0",
"tag_name": "v1.0",
"description": "",
"created_at": "2022-08-22T13:56:03.936Z",
"released_at": "2022-08-22T13:53:56.162Z",
"upcoming_release": false,
"author": {
"id": 8293968,
"username": "Ailex-",
"name": "Alex P",
"state": "active",
"avatar_url": "https://secure.gravatar.com/avatar/d6ed63df836147e9221342d2d92a77f3?s=80&d=identicon",
"web_url": "https://gitlab.com/Ailex-"
},
"commit": {
"id": "c5c9f1aab03b4355782d6230bd2d5e2c1770531d",
"short_id": "c5c9f1aa",
"created_at": "2022-08-22T15:27:02.000+02:00",
"parent_ids": [
"ea62344879405f6665740b1c2a1017f5b11afbcf"
],
"title": "uploaded to repo",
"message": "uploaded to repo\n",
"author_name": "Alex",
"author_email": "[email protected]",
"authored_date": "2022-08-22T15:27:02.000+02:00",
"committer_name": "Alex",
"committer_email": "[email protected]",
"committed_date": "2022-08-22T15:27:02.000+02:00",
"trailers": {},
"web_url": "https://gitlab.com/Ailex-/starilex-mk1-iva/-/commit/c5c9f1aab03b4355782d6230bd2d5e2c1770531d"
},
"commit_path": "/Ailex-/starilex-mk1-iva/-/commit/c5c9f1aab03b4355782d6230bd2d5e2c1770531d",
"tag_path": "/Ailex-/starilex-mk1-iva/-/tags/v1.0",
"assets": {
"count": 4,
"sources": [
{
"format": "zip",
"url": "https://gitlab.com/Ailex-/starilex-mk1-iva/-/archive/v1.0/starilex-mk1-iva-v1.0.zip"
},
{
"format": "tar.gz",
"url": "https://gitlab.com/Ailex-/starilex-mk1-iva/-/archive/v1.0/starilex-mk1-iva-v1.0.tar.gz"
},
{
"format": "tar.bz2",
"url": "https://gitlab.com/Ailex-/starilex-mk1-iva/-/archive/v1.0/starilex-mk1-iva-v1.0.tar.bz2"
},
{
"format": "tar",
"url": "https://gitlab.com/Ailex-/starilex-mk1-iva/-/archive/v1.0/starilex-mk1-iva-v1.0.tar"
}
],
"links": []
},
"evidences": [
{
"sha": "2afcaf5ecdb0781122ac637e13a634a7a864d90b374d",
"filepath": "https://gitlab.com/Ailex-/starilex-mk1-iva/-/releases/v1.0/evidences/3206286.json",
"collected_at": "2022-08-22T14:00:04.551Z"
}
],
"_links": {
"self": "https://gitlab.com/Ailex-/starilex-mk1-iva/-/releases/v1.0"
}
}
]
$ curl -s 'https://gitlab.com/api/v4/projects/Ailex-%2Fstarilex-mk1-iva'|jq
{
"id": 38781495,
"description": null,
"name": "Starilex MK1 IVA",
"name_with_namespace": "Alex P / Starilex MK1 IVA",
"path": "starilex-mk1-iva",
"path_with_namespace": "Ailex-/starilex-mk1-iva",
"created_at": "2022-08-22T13:13:46.126Z",
"default_branch": "main",
"tag_list": [],
"topics": [],
"ssh_url_to_repo": "[email protected]:Ailex-/starilex-mk1-iva.git",
"http_url_to_repo": "https://gitlab.com/Ailex-/starilex-mk1-iva.git",
"web_url": "https://gitlab.com/Ailex-/starilex-mk1-iva",
"readme_url": null,
"avatar_url": null,
"forks_count": 0,
"star_count": 0,
"last_activity_at": "2022-08-22T13:13:46.126Z",
"namespace": {
"id": 11130846,
"name": "Alex P",
"path": "Ailex-",
"kind": "user",
"full_path": "Ailex-",
"parent_id": null,
"avatar_url": "https://secure.gravatar.com/avatar/d6ed63df836147e9221342d2d92a77f3?s=80&d=identicon",
"web_url": "https://gitlab.com/Ailex-"
}
}
- https://gitlab.com/N70/Kerbalism
- https://gitlab.com/N70/JDiminishingRTG