跳到主要内容

Note Event

Description of Note event parameters

Request Headers

Parameter NameTypeDescription
User-Agentstring
Content-Typestring
X-GitCode-EventstringEvent type, Note Hook represents comment events
X-GitCode-DeliverystringUnique request ID

Request Parameters

Parameter NameParameter TypeDescription
object_kindstringEvent type, here it is "note"
event_typestringEvent type, here it is "note"
user.idintegerCommenter's user ID
user.namestringCommenter's name
user.usernamestringCommenter's login name
user.avatar_urlstringCommenter's avatar URL
user.emailstringCommenter's email
project_idintegerProject ID
project.idintegerProject ID
project.namestringProject name
project.web_urlstringProject web access address
project.avatar_urlstringProject avatar URL
project.git_ssh_urlstringProject SSH clone address
project.git_http_urlstringProject HTTP clone address
project.namespacestringProject namespace
project.visibility_levelintegerProject visibility level (0: private, 1: public)
project.path_with_namespacestringProject path with namespace
project.default_branchstringDefault branch
project.homepagestringProject homepage
project.urlstringProject Git repository URL
project.ssh_urlstringProject SSH clone URL
project.http_urlstringProject HTTP clone URL
object_attributes.author_idintegerComment author ID
object_attributes.change_positionobjectChange position information
object_attributes.created_atstringComment creation time
object_attributes.discussion_idstringDiscussion ID
object_attributes.idintegerComment ID
object_attributes.notestringComment content
object_attributes.noteable_idintegerID of the commented object
object_attributes.noteable_typestringCommented object type (Issue/MergeRequest/Commit)
object_attributes.original_positionobjectOriginal position information
object_attributes.positionobjectPosition information
object_attributes.project_idintegerProject ID
object_attributes.systembooleanWhether it is a system comment
object_attributes.typestringComment type
object_attributes.updated_atstringComment update time
object_attributes.descriptionstringComment description
object_attributes.urlstringComment URL
repository.namestringRepository name
repository.urlstringRepository Git URL
repository.homepagestringRepository homepage
repository.git_http_urlstringRepository HTTP clone address
repository.git_ssh_urlstringRepository SSH clone address
repository.visibility_levelintegerRepository visibility level (0: private, 1: public)
issueobjectIssue details, appears when the comment object is an issue
merge_requestobjectMerge request details, appears when the comment object is a MergeRequest
commitobjectCommit details, appears when the comment object is a commit
produce_random_idstringRandomly generated ID
manual_buildboolean
uuidstringUnique 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"
}