Gitlab has api, which I can use to get an info about project issue boards.
But when I use Gitlab Webhooks and issue events in particular, I do not receive any data about issue board where it came from. However, the data has an info about “project” and “repo”:
{
"object_kind": "issue",
"event_type": "issue",
"user": {
"id": 1,
"name": "Administrator",
},
"project": {
"id": 1,
"name": "testy",
"description": null,
},
...
...
}
Is there a way to get the data for a board from triggered webhook?
I didn’t find any info about that.
Gitlab version: 14.7.0-ee (free) and 15.11.2 (free) and I think it’s in every version
Gitlab set on my own computer.
Here is the full JSON from Issue event webhook, if it helps:
{
"object_kind": "issue",
"event_type": "issue",
"user": {
"id": 1,
"name": "Administrator Adminov",
"username": "root",
"avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
"email": "[REDACTED]"
},
"project": {
"id": 2,
"name": "Testy",
"description": "",
"web_url": "http://10.0.2.15:9999/gitlab-instance-1a281d7e/testy",
"avatar_url": null,
"git_ssh_url": "git@10.0.2.15:gitlab-instance-1a281d7e/testy.git",
"git_http_url": "http://10.0.2.15:9999/gitlab-instance-1a281d7e/testy.git",
"namespace": "GitLab Instance",
"visibility_level": 10,
"path_with_namespace": "gitlab-instance-1a281d7e/testy",
"default_branch": "main",
"ci_config_path": null,
"homepage": "http://10.0.2.15:9999/gitlab-instance-1a281d7e/testy",
"url": "git@10.0.2.15:gitlab-instance-1a281d7e/testy.git",
"ssh_url": "git@10.0.2.15:gitlab-instance-1a281d7e/testy.git",
"http_url": "http://10.0.2.15:9999/gitlab-instance-1a281d7e/testy.git"
},
"object_attributes": {
"author_id": 1,
"closed_at": null,
"confidential": false,
"created_at": "2023-05-24 13:42:46 UTC",
"description": "!A.Adminov, T.Testov",
"discussion_locked": null,
"due_date": null,
"id": 2,
"iid": 2,
"last_edited_at": "2023-06-03 08:31:16 UTC",
"last_edited_by_id": 1,
"milestone_id": null,
"moved_to_id": null,
"duplicated_to_id": null,
"project_id": 2,
"relative_position": 3332,
"state_id": 1,
"time_estimate": 0,
"title": "Testy2",
"updated_at": "2024-01-26 17:30:38 UTC",
"updated_by_id": 1,
"url": "http://10.0.2.15:9999/gitlab-instance-1a281d7e/testy/-/issues/2",
"total_time_spent": 0,
"time_change": 0,
"human_total_time_spent": null,
"human_time_change": null,
"human_time_estimate": null,
"assignee_ids": [],
"assignee_id": null,
"labels": [
{
"id": 9,
"title": "Fixme",
"color": "#ffffff",
"project_id": 2,
"created_at": "2023-05-05 08:56:47 UTC",
"updated_at": "2023-05-05 08:59:20 UTC",
"template": false,
"description": "",
"type": "ProjectLabel",
"group_id": null
}
],
"state": "opened",
"severity": "unknown",
"action": "update"
},
"labels": [
{
"id": 9,
"title": "Fixme",
"color": "#ffffff",
"project_id": 2,
"created_at": "2023-05-05 08:56:47 UTC",
"updated_at": "2023-05-05 08:59:20 UTC",
"template": false,
"description": "",
"type": "ProjectLabel",
"group_id": null
}
],
"changes": {
"relative_position": {
"previous": 3328,
"current": 3332
},
"labels": {
"previous": [
{
"id": 4,
"title": "TODO",
"color": "#f0ad4e",
"project_id": 2,
"created_at": "2023-05-05 08:55:52 UTC",
"updated_at": "2023-05-05 08:56:10 UTC",
"template": false,
"description": "",
"type": "ProjectLabel",
"group_id": null
}
],
"current": [
{
"id": 9,
"title": "Fixme",
"color": "#ffffff",
"project_id": 2,
"created_at": "2023-05-05 08:56:47 UTC",
"updated_at": "2023-05-05 08:59:20 UTC",
"template": false,
"description": "",
"type": "ProjectLabel",
"group_id": null
}
]
}
},
"repository": {
"name": "Testy",
"url": "git@10.0.2.15:gitlab-instance-1a281d7e/testy.git",
"description": "",
"homepage": "http://10.0.2.15:9999/gitlab-instance-1a281d7e/testy"
}
}