Closed acka47 closed 4 years ago
On test, webhook url is the same as for GitHub: https://test.skohub.io/build
Is the secret also the same? I guess so. Currently, I get an error similar to that one in GitHub mentioned in #61.
See https://github.com/hbz/skohub-vocabs/issues/61#issuecomment-571610588, please try again.
I tried it again, still doesn't work. The result looks very similar to that from GitHub, see https://github.com/hbz/skohub-vocabs/issues/61#issuecomment-571958044.
Request headers:
Content-Type: application/json
X-Gitlab-Event: Push Hook
X-Gitlab-Token: ***********
Request body:
{
"object_kind": "push",
"event_name": "push",
"before": "fe101614a02ea70e294adef358ea98849123f67c",
"after": "2d24eb892709d1d652bd36e0453673e019e5a0a9",
"ref": "refs/heads/master",
"checkout_sha": "2d24eb892709d1d652bd36e0453673e019e5a0a9",
"message": null,
"user_id": 1973305,
"user_name": "Adrian",
"user_username": "acka47",
"user_email": "",
"user_avatar": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/1973305/avatar.png",
"project_id": 16194845,
"project": {
"id": 16194845,
"name": "test-vocab",
"description": "For testing GitHub integration in skohub.io",
"web_url": "https://gitlab.com/acka47/test-vocab",
"avatar_url": null,
"git_ssh_url": "git@gitlab.com:acka47/test-vocab.git",
"git_http_url": "https://gitlab.com/acka47/test-vocab.git",
"namespace": "Adrian",
"visibility_level": 20,
"path_with_namespace": "acka47/test-vocab",
"default_branch": "master",
"ci_config_path": null,
"homepage": "https://gitlab.com/acka47/test-vocab",
"url": "git@gitlab.com:acka47/test-vocab.git",
"ssh_url": "git@gitlab.com:acka47/test-vocab.git",
"http_url": "https://gitlab.com/acka47/test-vocab.git"
},
"commits": [
{
"id": "2d24eb892709d1d652bd36e0453673e019e5a0a9",
"message": "Trigger SkoHub build\n",
"timestamp": "2020-01-08T09:04:32+01:00",
"url": "https://gitlab.com/acka47/test-vocab/commit/2d24eb892709d1d652bd36e0453673e019e5a0a9",
"author": {
"name": "Adrian Pohl",
"email": "pohl@hbz-nrw.de"
},
"added": [
],
"modified": [
],
"removed": [
]
}
],
"total_commits_count": 1,
"push_options": {
},
"repository": {
"name": "test-vocab",
"url": "git@gitlab.com:acka47/test-vocab.git",
"description": "For testing GitHub integration in skohub.io",
"homepage": "https://gitlab.com/acka47/test-vocab",
"git_http_url": "https://gitlab.com/acka47/test-vocab.git",
"git_ssh_url": "git@gitlab.com:acka47/test-vocab.git",
"visibility_level": 20
}
}
Response headers:
Date: Wed, 08 Jan 2020 08:04:37 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Type: text/plain; charset=utf-8
Content-Length: 40
Connection: close
Response body:
Payload was invalid, build not triggered
It works now, see https://test.skohub.io/build/?id=47aac5ca-84a9-408c-93cb-ffad5c67557f. +1
Support a wbhook-based approach fro publishing SKOS files in Turtle notation from GitLab.