Note Event
Description of Note event parameters
Request Headers
Parameter Name | Type | Description |
---|---|---|
User-Agent | string | |
Content-Type | string | |
X-GitCode-Event | string | Event type, Note Hook represents comment events |
X-GitCode-Delivery | string | Unique request ID |
Request Parameters
Parameter Name | Parameter Type | Description |
---|---|---|
object_kind | string | Event type, here it is "note" |
event_type | string | Event type, here it is "note" |
user.id | integer | Commenter's user ID |
user.name | string | Commenter's name |
user.username | string | Commenter's login name |
user.avatar_url | string | Commenter's avatar URL |
user.email | string | Commenter's email |
project_id | integer | Project ID |
project.id | integer | Project ID |
project.name | string | Project name |
project.web_url | string | Project web access address |
project.avatar_url | string | Project avatar URL |
project.git_ssh_url | string | Project SSH clone address |
project.git_http_url | string | Project HTTP clone address |
project.namespace | string | Project namespace |
project.visibility_level | integer | Project visibility level (0: private, 1: public) |
project.path_with_namespace | string | Project path with namespace |
project.default_branch | string | Default branch |
project.homepage | string | Project homepage |
project.url | string | Project Git repository URL |
project.ssh_url | string | Project SSH clone URL |
project.http_url | string | Project HTTP clone URL |
object_attributes.author_id | integer | Comment author ID |
object_attributes.change_position | object | Change position information |
object_attributes.created_at | string | Comment creation time |
object_attributes.discussion_id | string | Discussion ID |
object_attributes.id | integer | Comment ID |
object_attributes.note | string | Comment content |
object_attributes.noteable_id | integer | ID of the commented object |
object_attributes.noteable_type | string | Commented object type (Issue/MergeRequest/Commit) |
object_attributes.original_position | object | Original position information |
object_attributes.position | object | Position information |
object_attributes.project_id | integer | Project ID |
object_attributes.system | boolean | Whether it is a system comment |
object_attributes.type | string | Comment type |
object_attributes.updated_at | string | Comment update time |
object_attributes.description | string | Comment description |
object_attributes.url | string | Comment URL |
repository.name | string | Repository name |
repository.url | string | Repository Git URL |
repository.homepage | string | Repository homepage |
repository.git_http_url | string | Repository HTTP clone address |
repository.git_ssh_url | string | Repository SSH clone address |
repository.visibility_level | integer | Repository visibility level (0: private, 1: public) |
issue | object | Issue details, appears when the comment object is an issue |
merge_request | object | Merge request details, appears when the comment object is a MergeRequest |
commit | object | Commit details, appears when the comment object is a commit |
produce_random_id | string | Randomly generated ID |
manual_build | boolean | |
uuid | string | Unique event identifier |
Request Parameters Example
{
"object_kind": "note",
"event_type": "note",
"user": {
"id": 173794,
"name": "xiaogang_o",
"username": "xiaogang_o",
"avatar_url": "https://cdn-img.gitcode.com/ee/ca/756863eec250a6a067148d4d4fe71d28c3b9716a6f79c03a9f460543fa3dc838.jpg?time=1711433667506",
"email": "xiaogang@csdn.net"
},
"project_id": 1848674,
"project": {
"id": 1848674,
"name": "test",
"web_url": "https://gitcode.com/xiaogang_o/test",
"avatar_url": "https://cdn-img.gitcode.com/ee/ca/756863eec250a6a067148d4d4fe71d28c3b9716a6f79c03a9f460543fa3dc838.jpg?time=1711433667506",
"git_ssh_url": "git@gitcode.com:xiaogang_o/test.git",
"git_http_url": "https://gitcode.com/xiaogang_o/test.git",
"namespace": "xiaogang_o",
"visibility_level": 0,
"path_with_namespace": "xiaogang_o/test",
"default_branch": "main",
"homepage": "https://gitcode.com/xiaogang_o/test",
"url": "git@gitcode.com:xiaogang_o/test.git",
"ssh_url": "git@gitcode.com:xiaogang_o/test.git",
"http_url": "https://gitcode.com/xiaogang_o/test.git"
},
"object_attributes": {
"author_id": 173794,
"change_position": {},
"created_at": "2025-05-07T15:09:04+08:00",
"discussion_id": "f88d5fc2e14fc2a55efebff4a0e2e9b6a8a3c27f",
"id": 96281182,
"note": "Comment",
"noteable_id": 3084068,
"noteable_type": "Issue",
"original_position": {},
"position": {},
"project_id": 1848674,
"system": false,
"type": "DiscussionNote",
"updated_at": "2025-05-07T15:09:04+08:00",
"description": "Comment",
"url": "https://gitcode.com/xiaogang_o/test/issues/8#note_f88d5fc2e14fc2a55efebff4a0e2e9b6a8a3c27f"
},
"repository": {
"name": "test",
"url": "git@gitcode.com:xiaogang_o/test.git",
"homepage": "https://gitcode.com/xiaogang_o/test",
"git_http_url": "https://gitcode.com/xiaogang_o/test.git",
"git_ssh_url": "git@gitcode.com:xiaogang_o/test.git",
"visibility_level": 0
},
"issue": {
"author_id": 173794,
"author": {
"avatar_url": "https://cdn-img.gitcode.com/ee/ca/756863eec250a6a067148d4d4fe71d28c3b9716a6f79c03a9f460543fa3dc838.jpg?time=1711433667506",
"web_url": "https://gitcode.com/xiaogang_o",
"name": "xiaogang_o",
"id": 173794,
"email": "xiaogang@csdn.net",
"username": "xiaogang_o"
},
"confidential": false,
"created_at": "2025-05-07T14:19:24+08:00",
"description": "Content",
"id": 3084068,
"iid": 8,
"project_id": 1848674,
"relative_position": 1073745823,
"state": "opened",
"title": "Test issue",
"updated_at": "2025-05-07T15:09:04+08:00",
"url": "https://gitcode.com/xiaogang_o/test/issues/8",
"total_time_spent": 0,
"assignee_ids": []
},
"produce_random_id": "cbb9c209-2e64-4d9c-98e5-ba0f08cd9b20",
"manual_build": false,
"uuid": "5b8f08e9-a74c-44ac-beaf-7680e9862165"
}