- 푸시 이벤트
- 태그 이벤트
- 이슈 이벤트
- 댓글 이벤트
- 병합 요청 이벤트
- 위키 페이지 이벤트
- 파이프라인 이벤트
- 작업 이벤트
- 배포 이벤트
- 그룹 구성원 이벤트
- 하위 그룹 이벤트
- 기능 플래그 이벤트
- 릴리스 이벤트
- 이모지 이벤트
- 프로젝트 및 그룹 액세스 토큰 이벤트
웹후크 이벤트
이 페이지는 프로젝트 웹후크와 그룹 웹후크에 대해 트리거되는 이벤트를 나열합니다.
시스템 웹후크에 대해 트리거되는 이벤트 목록은 시스템 웹후크를 참조하세요.
프로젝트 및 그룹 웹후크 모두에 대해 트리거되는 이벤트:
이벤트 유형 | 트리거 |
---|---|
푸시 이벤트 | 리포지토리에 푸시가 이루어집니다. |
태그 이벤트 | 리포지토리에 태그가 생성되거나 삭제됩니다. |
이슈 이벤트 | 새로운 이슈가 생성되거나 기존 이슈가 업데이트, 닫히거나 재열립니다. |
코멘트 이벤트 | 커밋, 머지 요청, 이슈 및 코드 스니펫에 대해 새로운 댓글이 작성되거나 수정됩니다. 1 |
머지 요청 이벤트 | 머지 요청이 생성, 업데이트, 머지 또는 닫히거나 소스 브랜치에서 커밋이 추가됩니다. |
위키 페이지 이벤트 | 위키 페이지가 생성, 업데이트 또는 삭제됩니다. |
파이프라인 이벤트 | 파이프라인 상태가 변경됩니다. |
잡 이벤트 | 잡 상태가 변경됩니다. |
배포 이벤트 | 배포가 시작, 성공, 실패하거나 취소됩니다. |
피처 플래그 이벤트 | 피처 플래그가 켜지거나 꺼집니다. |
릴리스 이벤트 | 릴리스가 생성, 업데이트 또는 삭제됩니다. |
이모지 이벤트 | 이모지 반응이 추가되거나 제거됩니다. |
프로젝트 또는 그룹 접근 토큰 이벤트 | 프로젝트 또는 그룹 접근 토큰이 7일 후 만료됩니다. |
각주:
- 댓글이 편집될 때 트리거되는 댓글 이벤트는 도입됨 GitLab 16.11에서.
그룹 웹후크에 대해서만 트리거되는 이벤트:
이벤트 유형 | 트리거 |
---|---|
그룹 멤버 이벤트 | 사용자가 그룹에 추가되거나 제거되거나 사용자의 접근 수준 또는 접근 만료 날짜가 변경됩니다. |
서브그룹 이벤트 | 서브그룹이 생성되거나 그룹에서 제거됩니다. |
푸시 이벤트
푸시 이벤트는 리포지토리에 푸시할 때 트리거됩니다. 단, 다음의 경우는 제외됩니다:
- 태그를 푸시하는 경우.
- 단일 푸시가 기본적으로 세 개 이상의 브랜치에 대한 변경 사항을 포함하는 경우
(push_event_hooks_limit
설정에 따라 다름).
한 번에 20개 이상의 커밋을 푸시하는 경우, 페이로드의 commits
속성은 최신 20개의 커밋에 대한 정보만 포함됩니다. 상세한 커밋 데이터를 로딩하는 것은 비용이 크므로, 성능상의 이유로 이 제한이 존재합니다.
total_commits_count
속성은 실제 커밋 수를 포함합니다.
새로운 커밋 없이 브랜치를 생성하고 푸시하는 경우,
페이로드의 commits
속성은 비어 있습니다.
요청 헤더:
X-Gitlab-Event: Push Hook
페이로드 예시:
{
"object_kind": "push",
"event_name": "push",
"before": "95790bf891e76fee5e1747ab589903a6a1f80f22",
"after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"ref": "refs/heads/master",
"ref_protected": true,
"checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"user_id": 4,
"user_name": "John Smith",
"user_username": "jsmith",
"user_email": "john@example.com",
"user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80",
"project_id": 15,
"project":{
"id": 15,
"name":"Diaspora",
"description":"",
"web_url":"http://example.com/mike/diaspora",
"avatar_url":null,
"git_ssh_url":"git@example.com:mike/diaspora.git",
"git_http_url":"http://example.com/mike/diaspora.git",
"namespace":"Mike",
"visibility_level":0,
"path_with_namespace":"mike/diaspora",
"default_branch":"master",
"homepage":"http://example.com/mike/diaspora",
"url":"git@example.com:mike/diaspora.git",
"ssh_url":"git@example.com:mike/diaspora.git",
"http_url":"http://example.com/mike/diaspora.git"
},
"repository":{
"name": "Diaspora",
"url": "git@example.com:mike/diaspora.git",
"description": "",
"homepage": "http://example.com/mike/diaspora",
"git_http_url":"http://example.com/mike/diaspora.git",
"git_ssh_url":"git@example.com:mike/diaspora.git",
"visibility_level":0
},
"commits": [
{
"id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327",
"message": "Update Catalan translation to e38cb41.\n\nSee https://gitlab.com/gitlab-org/gitlab for more information",
"title": "Update Catalan translation to e38cb41.",
"timestamp": "2011-12-12T14:27:31+02:00",
"url": "http://example.com/mike/diaspora/commit/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327",
"author": {
"name": "Jordi Mallach",
"email": "jordi@softcatala.org"
},
"added": ["CHANGELOG"],
"modified": ["app/controller/application.rb"],
"removed": []
},
{
"id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"message": "fixed readme",
"title": "fixed readme",
"timestamp": "2012-01-03T23:36:29+02:00",
"url": "http://example.com/mike/diaspora/commit/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"author": {
"name": "GitLab dev user",
"email": "gitlabdev@dv6700.(none)"
},
"added": ["CHANGELOG"],
"modified": ["app/controller/application.rb"],
"removed": []
}
],
"total_commits_count": 4
}
태그 이벤트
태그 이벤트는 리포지토리에서 태그를 생성하거나 삭제할 때 트리거됩니다.
기본적으로 단일 푸시가 세 개 이상의 태그에 대한 변경 사항을 포함하는 경우 이 훅이 실행되지 않습니다 (이는
push_event_hooks_limit
설정에 따라 달라질 수 있습니다).
요청 헤더:
X-Gitlab-Event: Tag Push Hook
페이로드 예시:
{
"object_kind": "tag_push",
"event_name": "tag_push",
"before": "0000000000000000000000000000000000000000",
"after": "82b3d5ae55f7080f1e6022629cdb57bfae7cccc7",
"ref": "refs/tags/v1.0.0",
"ref_protected": true,
"checkout_sha": "82b3d5ae55f7080f1e6022629cdb57bfae7cccc7",
"user_id": 1,
"user_name": "John Smith",
"user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80",
"project_id": 1,
"project": {
"id": 1,
"name": "Example",
"description": "",
"web_url": "http://example.com/jsmith/example",
"avatar_url": null,
"git_ssh_url": "git@example.com:jsmith/example.git",
"git_http_url": "http://example.com/jsmith/example.git",
"namespace": "Jsmith",
"visibility_level": 0,
"path_with_namespace": "jsmith/example",
"default_branch": "master",
"homepage": "http://example.com/jsmith/example",
"url": "git@example.com:jsmith/example.git",
"ssh_url": "git@example.com:jsmith/example.git",
"http_url": "http://example.com/jsmith/example.git"
},
"repository": {
"name": "Example",
"url": "ssh://git@example.com/jsmith/example.git",
"description": "",
"homepage": "http://example.com/jsmith/example",
"git_http_url": "http://example.com/jsmith/example.git",
"git_ssh_url": "git@example.com:jsmith/example.git",
"visibility_level": 0
},
"commits": [],
"total_commits_count": 0
}
이슈 이벤트
object_attributes
에서type
속성은 GitLab 17.2에 추가되었습니다.
이슈 이벤트는 이슈 또는 작업 항목이 생성, 업데이트, 종료 또는 다시 열릴 때 트리거됩니다.
지원되는 작업 항목 유형은 다음과 같습니다:
이슈 및 서비스 데스크 이슈의 경우 object_kind
는 issue
이고, type
은 Issue
입니다.
다른 모든 작업 항목에 대해서는 object_kind
필드는 work_item
이며, type
은 작업 항목 유형입니다.
페이로드에서 object_attributes.action
에 사용할 수 있는 값은 다음과 같습니다:
open
close
reopen
update
assignee
및 assignee_id
키는 더 이상 사용되지 않으며 첫 번째 담당자만 포함합니다.
escalation_status
및 escalation_policy
필드는 에스컬레이션을 지원하는 이슈 유형에만 사용할 수 있습니다.
요청 헤더:
X-Gitlab-Event: Issue Hook
페이로드 예시:
{
"object_kind": "issue",
"event_type": "issue",
"user": {
"id": 1,
"name": "Administrator",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
"email": "admin@example.com"
},
"project": {
"id": 1,
"name": "Gitlab Test",
"description": "Aut reprehenderit ut est.",
"web_url": "http://example.com/gitlabhq/gitlab-test",
"avatar_url": null,
"git_ssh_url": "git@example.com:gitlabhq/gitlab-test.git",
"git_http_url": "http://example.com/gitlabhq/gitlab-test.git",
"namespace": "GitlabHQ",
"visibility_level": 20,
"path_with_namespace": "gitlabhq/gitlab-test",
"default_branch": "master",
"ci_config_path": null,
"homepage": "http://example.com/gitlabhq/gitlab-test",
"url": "http://example.com/gitlabhq/gitlab-test.git",
"ssh_url": "git@example.com:gitlabhq/gitlab-test.git",
"http_url": "http://example.com/gitlabhq/gitlab-test.git"
},
"object_attributes": {
"id": 301,
"title": "New API: create/update/delete file",
"assignee_ids": [51],
"assignee_id": 51,
"author_id": 51,
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"updated_by_id": 1,
"last_edited_at": null,
"last_edited_by_id": null,
"relative_position": 0,
"description": "Create new API for manipulations with repository",
"milestone_id": null,
"state_id": 1,
"confidential": false,
"discussion_locked": true,
"due_date": null,
"moved_to_id": null,
"duplicated_to_id": null,
"time_estimate": 0,
"total_time_spent": 0,
"time_change": 0,
"human_total_time_spent": null,
"human_time_estimate": null,
"human_time_change": null,
"weight": null,
"health_status": "at_risk",
"type": "Issue",
"iid": 23,
"url": "http://example.com/diaspora/issues/23",
"state": "opened",
"action": "open",
"severity": "high",
"escalation_status": "triggered",
"escalation_policy": {
"id": 18,
"name": "Engineering On-call"
},
"labels": [{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}]
},
"repository": {
"name": "Gitlab Test",
"url": "http://example.com/gitlabhq/gitlab-test.git",
"description": "Aut reprehenderit ut est.",
"homepage": "http://example.com/gitlabhq/gitlab-test"
},
"assignees": [{
"name": "User1",
"username": "user1",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
}],
"assignee": {
"name": "User1",
"username": "user1",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
},
"labels": [{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}],
"changes": {
"updated_by_id": {
"previous": null,
"current": 1
},
"updated_at": {
"previous": "2017-09-15 16:50:55 UTC",
"current": "2017-09-15 16:52:00 UTC"
},
"labels": {
"previous": [{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}],
"current": [{
"id": 205,
"title": "Platform",
"color": "#123123",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "Platform related issues",
"type": "ProjectLabel",
"group_id": 41
}]
}
}
}
댓글 이벤트
object_attributes.action
속성이 GitLab 16.11에서 도입되었습니다.
댓글 이벤트는 커밋, 병합 요청, 이슈 및 코드 스니펫에 새 댓글을 작성하거나 편집할 때 트리거됩니다.
노트 데이터는 object_attributes
에 저장됩니다 (예: note
또는 noteable_type
).
페이로드에는 댓글의 대상에 대한 정보가 포함됩니다. 예를 들어, 이슈에 대한 댓글은 issue
키 아래에 특정 이슈 정보를 포함합니다.
사용 가능한 대상 유형은 다음과 같습니다:
commit
merge_request
issue
snippet
페이로드에서 object_attributes.action
의 사용 가능한 값은 다음과 같습니다:
create
update
커밋에 대한 댓글
요청 헤더:
X-Gitlab-Event: Note Hook
페이로드 예시:
{
"object_kind": "note",
"event_type": "note",
"user": {
"id": 1,
"name": "Administrator",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
"email": "admin@example.com"
},
"project_id": 5,
"project":{
"id": 5,
"name":"Gitlab Test",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/gitlabhq/gitlab-test",
"avatar_url":null,
"git_ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
"git_http_url":"http://example.com/gitlabhq/gitlab-test.git",
"namespace":"GitlabHQ",
"visibility_level":20,
"path_with_namespace":"gitlabhq/gitlab-test",
"default_branch":"master",
"homepage":"http://example.com/gitlabhq/gitlab-test",
"url":"http://example.com/gitlabhq/gitlab-test.git",
"ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
"http_url":"http://example.com/gitlabhq/gitlab-test.git"
},
"repository":{
"name": "Gitlab Test",
"url": "http://example.com/gitlab-org/gitlab-test.git",
"description": "Aut reprehenderit ut est.",
"homepage": "http://example.com/gitlab-org/gitlab-test"
},
"object_attributes": {
"id": 1243,
"note": "이것은 커밋 댓글입니다. 이 작업은 어떻게 작동하나요?",
"noteable_type": "Commit",
"author_id": 1,
"created_at": "2015-05-17 18:08:09 UTC",
"updated_at": "2015-05-17 18:08:09 UTC",
"project_id": 5,
"attachment":null,
"line_code": "bec9703f7a456cd2b4ab5fb3220ae016e3e394e3_0_1",
"commit_id": "cfe32cf61b73a0d5e9f13e774abde7ff789b1660",
"noteable_id": null,
"system": false,
"st_diff": {
"diff": "--- /dev/null\n+++ b/six\n@@ -0,0 +1 @@\n+Subproject commit 409f37c4f05865e4fb208c771485f211a22c4c2d\n",
"new_path": "six",
"old_path": "six",
"a_mode": "0",
"b_mode": "160000",
"new_file": true,
"renamed_file": false,
"deleted_file": false
},
"action": "create",
"url": "http://example.com/gitlab-org/gitlab-test/commit/cfe32cf61b73a0d5e9f13e774abde7ff789b1660#note_1243"
},
"commit": {
"id": "cfe32cf61b73a0d5e9f13e774abde7ff789b1660",
"message": "Add submodule\n\nSigned-off-by: Example User \u003cuser@example.com.com\u003e\n",
"timestamp": "2014-02-27T10:06:20+02:00",
"url": "http://example.com/gitlab-org/gitlab-test/commit/cfe32cf61b73a0d5e9f13e774abde7ff789b1660",
"author": {
"name": "Example User",
"email": "user@example.com"
}
}
}
병합 요청에 대한 댓글
요청 헤더:
X-Gitlab-Event: Note Hook
페이로드 예시:
{
"object_kind": "note",
"event_type": "note",
"user": {
"id": 1,
"name": "관리자",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
"email": "admin@example.com"
},
"project_id": 5,
"project": {
"id": 5,
"name": "Gitlab 테스트",
"description": "Aut reprehenderit ut est.",
"web_url": "http://example.com/gitlab-org/gitlab-test",
"avatar_url": null,
"git_ssh_url": "git@example.com:gitlab-org/gitlab-test.git",
"git_http_url": "http://example.com/gitlab-org/gitlab-test.git",
"namespace": "Gitlab Org",
"visibility_level": 10,
"path_with_namespace": "gitlab-org/gitlab-test",
"default_branch": "master",
"homepage": "http://example.com/gitlab-org/gitlab-test",
"url": "http://example.com/gitlab-org/gitlab-test.git",
"ssh_url": "git@example.com:gitlab-org/gitlab-test.git",
"http_url": "http://example.com/gitlab-org/gitlab-test.git"
},
"repository": {
"name": "Gitlab 테스트",
"url": "http://localhost/gitlab-org/gitlab-test.git",
"description": "Aut reprehenderit ut est.",
"homepage": "http://example.com/gitlab-org/gitlab-test"
},
"object_attributes": {
"id": 1244,
"note": "이 MR은 작업이 필요합니다.",
"noteable_type": "MergeRequest",
"author_id": 1,
"created_at": "2015-05-17 18:21:36 UTC",
"updated_at": "2015-05-17 18:21:36 UTC",
"project_id": 5,
"attachment": null,
"line_code": null,
"commit_id": "",
"noteable_id": 7,
"system": false,
"st_diff": null,
"action": "create",
"url": "http://example.com/gitlab-org/gitlab-test/merge_requests/1#note_1244"
},
"merge_request": {
"id": 7,
"target_branch": "markdown",
"source_branch": "master",
"source_project_id": 5,
"author_id": 8,
"assignee_id": 28,
"title": "Tempora et eos debitis quae laborum et.",
"created_at": "2015-03-01 20:12:53 UTC",
"updated_at": "2015-03-21 18:27:27 UTC",
"milestone_id": 11,
"state": "opened",
"merge_status": "cannot_be_merged",
"target_project_id": 5,
"iid": 1,
"description": "Et voluptas corrupti assumenda temporibus. Architecto cum animi eveniet amet asperiores. Vitae numquam voluptate est natus sit et ad id.",
"position": 0,
"labels": [
{
"id": 25,
"title": "Afterpod",
"color": "#3e8068",
"project_id": null,
"created_at": "2019-06-05T14:32:20.211Z",
"updated_at": "2019-06-05T14:32:20.211Z",
"template": false,
"description": null,
"type": "GroupLabel",
"group_id": 4
},
{
"id": 86,
"title": "Element",
"color": "#231afe",
"project_id": 4,
"created_at": "2019-06-05T14:32:20.637Z",
"updated_at": "2019-06-05T14:32:20.637Z",
"template": false,
"description": null,
"type": "ProjectLabel",
"group_id": null
}
],
"source": {
"name": "Gitlab 테스트",
"description": "Aut reprehenderit ut est.",
"web_url": "http://example.com/gitlab-org/gitlab-test",
"avatar_url": null,
"git_ssh_url": "git@example.com:gitlab-org/gitlab-test.git",
"git_http_url": "http://example.com/gitlab-org/gitlab-test.git",
"namespace": "Gitlab Org",
"visibility_level": 10,
"path_with_namespace": "gitlab-org/gitlab-test",
"default_branch": "master",
"homepage": "http://example.com/gitlab-org/gitlab-test",
"url": "http://example.com/gitlab-org/gitlab-test.git",
"ssh_url": "git@example.com:gitlab-org/gitlab-test.git",
"http_url": "http://example.com/gitlab-org/gitlab-test.git"
},
"target": {
"name": "Gitlab 테스트",
"description": "Aut reprehenderit ut est.",
"web_url": "http://example.com/gitlab-org/gitlab-test",
"avatar_url": null,
"git_ssh_url": "git@example.com:gitlab-org/gitlab-test.git",
"git_http_url": "http://example.com/gitlab-org/gitlab-test.git",
"namespace": "Gitlab Org",
"visibility_level": 10,
"path_with_namespace": "gitlab-org/gitlab-test",
"default_branch": "master",
"homepage": "http://example.com/gitlab-org/gitlab-test",
"url": "http://example.com/gitlab-org/gitlab-test.git",
"ssh_url": "git@example.com:gitlab-org/gitlab-test.git",
"http_url": "http://example.com/gitlab-org/gitlab-test.git"
},
"last_commit": {
"id": "562e173be03b8ff2efb05345d12df18815438a4b",
"message": "Merge branch 'another-branch' into 'master'\n\n이 테스트에서 확인하세요\n",
"timestamp": "2015-04-08T21: 00:25-07:00",
"url": "http://example.com/gitlab-org/gitlab-test/commit/562e173be03b8ff2efb05345d12df18815438a4b",
"author": {
"name": "John Smith",
"email": "john@example.com"
}
},
"work_in_progress": false,
"draft": false,
"assignee": {
"name": "사용자1",
"username": "user1",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
},
"detailed_merge_status": "checking"
}
}
이슈에 대한 댓글
-
assignee_id
필드는 더 이상 사용되지 않으며 첫 번째 담당자만 표시됩니다. -
event_type
은 기밀 이슈에 대해confidential_note
로 설정됩니다.
요청 헤더:
X-Gitlab-Event: Note Hook
페이로드 예시:
{
"object_kind": "note",
"event_type": "note",
"user": {
"id": 1,
"name": "Administrator",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
"email": "admin@example.com"
},
"project_id": 5,
"project": {
"id": 5,
"name": "Gitlab Test",
"description": "Aut reprehenderit ut est.",
"web_url": "http://example.com/gitlab-org/gitlab-test",
"avatar_url": null,
"git_ssh_url": "git@example.com:gitlab-org/gitlab-test.git",
"git_http_url": "http://example.com/gitlab-org/gitlab-test.git",
"namespace": "Gitlab Org",
"visibility_level": 10,
"path_with_namespace": "gitlab-org/gitlab-test",
"default_branch": "master",
"homepage": "http://example.com/gitlab-org/gitlab-test",
"url": "http://example.com/gitlab-org/gitlab-test.git",
"ssh_url": "git@example.com:gitlab-org/gitlab-test.git",
"http_url": "http://example.com/gitlab-org/gitlab-test.git"
},
"repository": {
"name": "diaspora",
"url": "git@example.com:mike/diaspora.git",
"description": "",
"homepage": "http://example.com/mike/diaspora"
},
"object_attributes": {
"id": 1241,
"note": "Hello world",
"noteable_type": "Issue",
"author_id": 1,
"created_at": "2015-05-17 17:06:40 UTC",
"updated_at": "2015-05-17 17:06:40 UTC",
"project_id": 5,
"attachment": null,
"line_code": null,
"commit_id": "",
"noteable_id": 92,
"system": false,
"st_diff": null,
"action": "create",
"url": "http://example.com/gitlab-org/gitlab-test/issues/17#note_1241"
},
"issue": {
"id": 92,
"title": "test",
"assignee_ids": [],
"assignee_id": null,
"author_id": 1,
"project_id": 5,
"created_at": "2015-04-12 14:53:17 UTC",
"updated_at": "2015-04-26 08:28:42 UTC",
"position": 0,
"branch_name": null,
"description": "test",
"milestone_id": null,
"state": "closed",
"iid": 17,
"labels": [
{
"id": 25,
"title": "Afterpod",
"color": "#3e8068",
"project_id": null,
"created_at": "2019-06-05T14:32:20.211Z",
"updated_at": "2019-06-05T14:32:20.211Z",
"template": false,
"description": null,
"type": "GroupLabel",
"group_id": 4
},
{
"id": 86,
"title": "Element",
"color": "#231afe",
"project_id": 4,
"created_at": "2019-06-05T14:32:20.637Z",
"updated_at": "2019-06-05T14:32:20.637Z",
"template": false,
"description": null,
"type": "ProjectLabel",
"group_id": null
}
]
}
}
코드 스니펫에 대한 댓글
요청 헤더:
X-Gitlab-Event: Note Hook
페이로드 예시:
{
"object_kind": "note",
"event_type": "note",
"user": {
"id": 1,
"name": "Administrator",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
"email": "admin@example.com"
},
"project_id": 5,
"project":{
"id": 5,
"name":"Gitlab Test",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/gitlab-org/gitlab-test",
"avatar_url":null,
"git_ssh_url":"git@example.com:gitlab-org/gitlab-test.git",
"git_http_url":"http://example.com/gitlab-org/gitlab-test.git",
"namespace":"Gitlab Org",
"visibility_level":10,
"path_with_namespace":"gitlab-org/gitlab-test",
"default_branch":"master",
"homepage":"http://example.com/gitlab-org/gitlab-test",
"url":"http://example.com/gitlab-org/gitlab-test.git",
"ssh_url":"git@example.com:gitlab-org/gitlab-test.git",
"http_url":"http://example.com/gitlab-org/gitlab-test.git"
},
"repository":{
"name":"Gitlab Test",
"url":"http://example.com/gitlab-org/gitlab-test.git",
"description":"Aut reprehenderit ut est.",
"homepage":"http://example.com/gitlab-org/gitlab-test"
},
"object_attributes": {
"id": 1245,
"note": "이 스니펫이 의도한 대로 작동하고 있나요?",
"noteable_type": "Snippet",
"author_id": 1,
"created_at": "2015-05-17 18:35:50 UTC",
"updated_at": "2015-05-17 18:35:50 UTC",
"project_id": 5,
"attachment": null,
"line_code": null,
"commit_id": "",
"noteable_id": 53,
"system": false,
"st_diff": null,
"action": "create",
"url": "http://example.com/gitlab-org/gitlab-test/-/snippets/53#note_1245"
},
"snippet": {
"id": 53,
"title": "test",
"description": "A snippet description.",
"content": "puts 'Hello world'",
"author_id": 1,
"project_id": 5,
"created_at": "2015-04-09 02:40:38 UTC",
"updated_at": "2015-04-09 02:40:38 UTC",
"file_name": "test.rb",
"type": "ProjectSnippet",
"visibility_level": 0,
"url": "http://example.com/gitlab-org/gitlab-test/-/snippets/53"
}
}
병합 요청 이벤트
병합 요청 이벤트는 다음과 같은 경우에 트리거됩니다:
- 새로운 병합 요청이 생성됩니다.
- 기존 병합 요청이 업데이트, 승인(모든 필수 승인자에 의해), 비승인, 병합 또는 닫힙니다.
- 개별 사용자가 기존 병합 요청에 대한 승인을 추가하거나 제거합니다.
- 소스 브랜치에 커밋이 추가됩니다.
- 병합 요청에서 모든 스레드가 해결됩니다.
페이로드에서 object_attributes.action
에 대한 사용 가능한 값은 다음과 같습니다:
open
close
reopen
update
approved
unapproved
approval
unapproval
merge
object_attributes.oldrev
필드는 실제 코드 변경 사항이 있는 경우에만 사용 가능합니다. 예를 들면:
- 새로운 코드가 푸시됩니다.
- 제안이 적용됩니다.
요청 헤더:
X-Gitlab-Event: Merge Request Hook
페이로드 예시:
{
"object_kind": "merge_request",
"event_type": "merge_request",
"user": {
"id": 1,
"name": "Administrator",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
"email": "admin@example.com"
},
"project": {
"id": 1,
"name":"Gitlab Test",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/gitlabhq/gitlab-test",
"avatar_url":null,
"git_ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
"git_http_url":"http://example.com/gitlabhq/gitlab-test.git",
"namespace":"GitlabHQ",
"visibility_level":20,
"path_with_namespace":"gitlabhq/gitlab-test",
"default_branch":"master",
"ci_config_path":"",
"homepage":"http://example.com/gitlabhq/gitlab-test",
"url":"http://example.com/gitlabhq/gitlab-test.git",
"ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
"http_url":"http://example.com/gitlabhq/gitlab-test.git"
},
"repository": {
"name": "Gitlab Test",
"url": "http://example.com/gitlabhq/gitlab-test.git",
"description": "Aut reprehenderit ut est.",
"homepage": "http://example.com/gitlabhq/gitlab-test"
},
"object_attributes": {
"id": 99,
"iid": 1,
"target_branch": "master",
"source_branch": "ms-viewport",
"source_project_id": 14,
"author_id": 51,
"assignee_ids": [6],
"assignee_id": 6,
"reviewer_ids": [6],
"title": "MS-Viewport",
"created_at": "2013-12-03T17:23:34Z",
"updated_at": "2013-12-03T17:23:34Z",
"last_edited_at": "2013-12-03T17:23:34Z",
"last_edited_by_id": 1,
"milestone_id": null,
"state_id": 1,
"state": "opened",
"blocking_discussions_resolved": true,
"work_in_progress": false,
"draft": false,
"first_contribution": true,
"merge_status": "unchecked",
"target_project_id": 14,
"description": "",
"prepared_at": "2013-12-03T19:23:34Z",
"total_time_spent": 1800,
"time_change": 30,
"human_total_time_spent": "30m",
"human_time_change": "30s",
"human_time_estimate": "30m",
"url": "http://example.com/diaspora/merge_requests/1",
"source": {
"name":"Awesome Project",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/awesome_space/awesome_project",
"avatar_url":null,
"git_ssh_url":"git@example.com:awesome_space/awesome_project.git",
"git_http_url":"http://example.com/awesome_space/awesome_project.git",
"namespace":"Awesome Space",
"visibility_level":20,
"path_with_namespace":"awesome_space/awesome_project",
"default_branch":"master",
"homepage":"http://example.com/awesome_space/awesome_project",
"url":"http://example.com/awesome_space/awesome_project.git",
"ssh_url":"git@example.com:awesome_space/awesome_project.git",
"http_url":"http://example.com/awesome_space/awesome_project.git"
},
"target": {
"name":"Awesome Project",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/awesome_space/awesome_project",
"avatar_url":null,
"git_ssh_url":"git@example.com:awesome_space/awesome_project.git",
"git_http_url":"http://example.com/awesome_space/awesome_project.git",
"namespace":"Awesome Space",
"visibility_level":20,
"path_with_namespace":"awesome_space/awesome_project",
"default_branch":"master",
"homepage":"http://example.com/awesome_space/awesome_project",
"url":"http://example.com/awesome_space/awesome_project.git",
"ssh_url":"git@example.com:awesome_space/awesome_project.git",
"http_url":"http://example.com/awesome_space/awesome_project.git"
},
"last_commit": {
"id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"message": "fixed readme",
"title": "Update file README.md",
"timestamp": "2012-01-03T23:36:29+02:00",
"url": "http://example.com/awesome_space/awesome_project/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"author": {
"name": "GitLab dev user",
"email": "gitlabdev@dv6700.(none)"
}
},
"labels": [{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}],
"action": "open",
"detailed_merge_status": "mergeable"
},
"labels": [{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}],
"changes": {
"updated_by_id": {
"previous": null,
"current": 1
},
"draft": {
"previous": true,
"current": false
},
"updated_at": {
"previous": "2017-09-15 16:50:55 UTC",
"current":"2017-09-15 16:52:00 UTC"
},
"labels": {
"previous": [{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}],
"current": [{
"id": 205,
"title": "Platform",
"color": "#123123",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "Platform related issues",
"type": "ProjectLabel",
"group_id": 41
}]
},
"last_edited_at": {
"previous": null,
"current": "2023-03-15 00:00:10 UTC"
},
"last_edited_by_id": {
"previous": null,
"current": 3278533
}
},
"assignees": [
{
"id": 6,
"name": "User1",
"username": "user1",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
}
],
"reviewers": [
{
"id": 6,
"name": "User1",
"username": "user1",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
}
]
}
참고:
assignee_id
및 merge_status
필드는 사용 중단됨.
위키 페이지 이벤트
위키 페이지 이벤트는 위키 페이지가 생성, 업데이트 또는 삭제될 때 발생합니다.
요청 헤더:
X-Gitlab-Event: Wiki Page Hook
페이로드 예시:
{
"object_kind": "wiki_page",
"user": {
"id": 1,
"name": "관리자",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
"email": "admin@example.com"
},
"project": {
"id": 1,
"name": "awesome-project",
"description": "이것은 놀라운 프로젝트입니다.",
"web_url": "http://example.com/root/awesome-project",
"avatar_url": null,
"git_ssh_url": "git@example.com:root/awesome-project.git",
"git_http_url": "http://example.com/root/awesome-project.git",
"namespace": "root",
"visibility_level": 0,
"path_with_namespace": "root/awesome-project",
"default_branch": "master",
"homepage": "http://example.com/root/awesome-project",
"url": "git@example.com:root/awesome-project.git",
"ssh_url": "git@example.com:root/awesome-project.git",
"http_url": "http://example.com/root/awesome-project.git"
},
"wiki": {
"web_url": "http://example.com/root/awesome-project/-/wikis/home",
"git_ssh_url": "git@example.com:root/awesome-project.wiki.git",
"git_http_url": "http://example.com/root/awesome-project.wiki.git",
"path_with_namespace": "root/awesome-project.wiki",
"default_branch": "master"
},
"object_attributes": {
"title": "놀라운",
"content": "놀라운 내용이 여기에 들어갑니다.",
"format": "markdown",
"message": "위키에 놀라운 페이지 추가",
"slug": "awesome",
"url": "http://example.com/root/awesome-project/-/wikis/awesome",
"action": "create",
"diff_url": "http://example.com/root/awesome-project/-/wikis/home/diff?version_id=78ee4a6705abfbff4f4132c6646dbaae9c8fb6ec",
"version_id": "3ad67c972065298d226dd80b2b03e0fc2421e731"
}
}
파이프라인 이벤트
파이프라인 이벤트는 파이프라인의 상태가 변경될 때 발생합니다.
GitLab 15.1부터 차단된 사용자가 트리거한 파이프라인 웹훅은 처리되지 않습니다.
GitLab 16.1부터 파이프라인 웹훅은 object_attributes.name
을 노출하기 시작했습니다.
요청 헤더:
X-Gitlab-Event: Pipeline Hook
페이로드 예시:
{
"object_kind": "pipeline",
"object_attributes":{
"id": 31,
"iid": 3,
"name": "master 브랜치에 대한 파이프라인",
"ref": "master",
"tag": false,
"sha": "bcbb5ec396a2c0f828686f14fac9b80b780504f2",
"before_sha": "bcbb5ec396a2c0f828686f14fac9b80b780504f2",
"source": "merge_request_event",
"status": "success",
"stages":[
"build",
"test",
"deploy"
],
"created_at": "2016-08-12 15:23:28 UTC",
"finished_at": "2016-08-12 15:26:29 UTC",
"duration": 63,
"variables": [
{
"key": "NESTOR_PROD_ENVIRONMENT",
"value": "us-west-1"
}
],
"url": "http://example.com/gitlab-org/gitlab-test/-/pipelines/31"
},
"merge_request": {
"id": 1,
"iid": 1,
"title": "테스트",
"source_branch": "test",
"source_project_id": 1,
"target_branch": "master",
"target_project_id": 1,
"state": "opened",
"merge_status": "can_be_merged",
"detailed_merge_status": "mergeable",
"url": "http://192.168.64.1:3005/gitlab-org/gitlab-test/merge_requests/1"
},
"user":{
"id": 1,
"name": "관리자",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80\u0026d=identicon",
"email": "user_email@gitlab.com"
},
"project":{
"id": 1,
"name": "Gitlab 테스트",
"description": "이것은 유사한 고통을 보이는 것입니다.",
"web_url": "http://192.168.64.1:3005/gitlab-org/gitlab-test",
"avatar_url": null,
"git_ssh_url": "git@192.168.64.1:gitlab-org/gitlab-test.git",
"git_http_url": "http://192.168.64.1:3005/gitlab-org/gitlab-test.git",
"namespace": "Gitlab Org",
"visibility_level": 20,
"path_with_namespace": "gitlab-org/gitlab-test",
"default_branch": "master"
},
"commit":{
"id": "bcbb5ec396a2c0f828686f14fac9b80b780504f2",
"message": "테스트\n",
"timestamp": "2016-08-12T17:23:21+02:00",
"url": "http://example.com/gitlab-org/gitlab-test/commit/bcbb5ec396a2c0f828686f14fac9b80b780504f2",
"author":{
"name": "사용자",
"email": "user@gitlab.com"
}
},
"source_pipeline":{
"project":{
"id": 41,
"web_url": "https://gitlab.example.com/gitlab-org/upstream-project",
"path_with_namespace": "gitlab-org/upstream-project"
},
"pipeline_id": 30,
"job_id": 3401
},
"builds":[
{
"id": 380,
"stage": "배포",
"name": "생산",
"status": "스킵",
"created_at": "2016-08-12 15:23:28 UTC",
"started_at": null,
"finished_at": null,
"duration": null,
"queued_duration": null,
"failure_reason": null,
"when": "수동",
"manual": true,
"allow_failure": false,
"user":{
"id": 1,
"name": "관리자",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80\u0026d=identicon",
"email": "admin@example.com"
},
"runner": null,
"artifacts_file":{
"filename": null,
"size": null
},
"environment": {
"name": "생산",
"action": "시작",
"deployment_tier": "생산"
}
},
{
"id": 377,
"stage": "테스트",
"name": "테스트 이미지",
"status": "성공",
"created_at": "2016-08-12 15:23:28 UTC",
"started_at": "2016-08-12 15:26:12 UTC",
"finished_at": "2016-08-12 15:26:29 UTC",
"duration": 17.0,
"queued_duration": 196.0,
"failure_reason": null,
"when": "성공 시",
"manual": false,
"allow_failure": false,
"user":{
"id": 1,
"name": "관리자",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80\u0026d=identicon",
"email": "admin@example.com"
},
"runner": {
"id": 380987,
"description": "shared-runners-manager-6.gitlab.com",
"active": true,
"runner_type": "instance_type",
"is_shared": true,
"tags": [
"linux",
"docker",
"shared-runner"
]
},
"artifacts_file":{
"filename": null,
"size": null
},
"environment": null
},
{
"id": 378,
"stage": "테스트",
"name": "테스트 빌드",
"status": "실패",
"created_at": "2016-08-12 15:23:28 UTC",
"started_at": "2016-08-12 15:26:12 UTC",
"finished_at": "2016-08-12 15:26:29 UTC",
"duration": 17.0,
"queued_duration": 196.0,
"failure_reason": "스크립트 오류",
"when": "성공 시",
"manual": false,
"allow_failure": false,
"user":{
"id": 1,
"name": "관리자",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80\u0026d=identicon",
"email": "admin@example.com"
},
"runner": {
"id": 380987,
"description": "shared-runners-manager-6.gitlab.com",
"active": true,
"runner_type": "instance_type",
"is_shared": true,
"tags": [
"linux",
"docker"
]
},
"artifacts_file":{
"filename": null,
"size": null
},
"environment": null
},
{
"id": 376,
"stage": "빌드",
"name": "빌드 이미지",
"status": "성공",
"created_at": "2016-08-12 15:23:28 UTC",
"started_at": "2016-08-12 15:24:56 UTC",
"finished_at": "2016-08-12 15:25:26 UTC",
"duration": 17.0,
"queued_duration": 196.0,
"failure_reason": null,
"when": "성공 시",
"manual": false,
"allow_failure": false,
"user":{
"id": 1,
"name": "관리자",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80\u0026d=identicon",
"email": "admin@example.com"
},
"runner": {
"id": 380987,
"description": "shared-runners-manager-6.gitlab.com",
"active": true,
"runner_type": "instance_type",
"is_shared": true,
"tags": [
"linux",
"docker"
]
},
"artifacts_file":{
"filename": null,
"size": null
},
"environment": null
},
{
"id": 379,
"stage": "배포",
"name": "스테이징",
"status": "생성됨",
"created_at": "2016-08-12 15:23:28 UTC",
"started_at": null,
"finished_at": null,
"duration": null,
"queued_duration": null,
"failure_reason": null,
"when": "성공 시",
"manual": false,
"allow_failure": false,
"user":{
"id": 1,
"name": "관리자",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80\u0026d=identicon",
"email": "admin@example.com"
},
"runner": null,
"artifacts_file":{
"filename": null,
"size": null
},
"environment": {
"name": "스테이징",
"action": "시작",
"deployment_tier": "스테이징"
}
}
]
}
작업 이벤트
작업 이벤트는 작업의 상태가 변경될 때 트리거됩니다.
페이로드의 commit.id
는 파이프라인의 ID이며, 커밋의 ID는 아닙니다.
GitLab 15.1 이후로, 차단된 사용자에 의해 트리거된 작업 이벤트는 처리되지 않습니다.
요청 헤더:
X-Gitlab-Event: Job Hook
페이로드 예시:
{
"object_kind": "build",
"ref": "gitlab-script-trigger",
"tag": false,
"before_sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
"sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
"build_id": 1977,
"build_name": "test",
"build_stage": "test",
"build_status": "created",
"build_created_at": "2021-02-23T02:41:37.886Z",
"build_started_at": null,
"build_finished_at": null,
"build_duration": null,
"build_queued_duration": 1095.588715, // 지속 시간(초)
"build_allow_failure": false,
"build_failure_reason": "script_failure",
"retries_count": 2, // 이 작업의 두 번째 재시도
"pipeline_id": 2366,
"project_id": 380,
"project_name": "gitlab-org/gitlab-test",
"user": {
"id": 3,
"name": "User",
"email": "user@gitlab.com",
"avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80\u0026d=identicon"
},
"commit": {
"id": 2366,
"name": "Build pipeline",
"sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
"message": "test\n",
"author_name": "User",
"author_email": "user@gitlab.com",
"status": "created",
"duration": null,
"started_at": null,
"finished_at": null
},
"repository": {
"name": "gitlab_test",
"description": "유사한 고통을 겪는 것에 대한 설명입니다.",
"homepage": "http://192.168.64.1:3005/gitlab-org/gitlab-test",
"git_ssh_url": "git@192.168.64.1:gitlab-org/gitlab-test.git",
"git_http_url": "http://192.168.64.1:3005/gitlab-org/gitlab-test.git",
"visibility_level": 20
},
"project":{
"id": 380,
"name": "Gitlab Test",
"description": "유사한 고통을 겪는 것에 대한 설명입니다.",
"web_url": "http://192.168.64.1:3005/gitlab-org/gitlab-test",
"avatar_url": null,
"git_ssh_url": "git@192.168.64.1:gitlab-org/gitlab-test.git",
"git_http_url": "http://192.168.64.1:3005/gitlab-org/gitlab-test.git",
"namespace": "Gitlab Org",
"visibility_level": 20,
"path_with_namespace": "gitlab-org/gitlab-test",
"default_branch": "master"
},
"runner": {
"active": true,
"runner_type": "project_type",
"is_shared": false,
"id": 380987,
"description": "shared-runners-manager-6.gitlab.com",
"tags": [
"linux",
"docker"
]
},
"environment": null,
"source_pipeline":{
"project":{
"id": 41,
"web_url": "https://gitlab.example.com/gitlab-org/upstream-project",
"path_with_namespace": "gitlab-org/upstream-project"
},
"pipeline_id": 30,
"job_id": 3401
}
}
재시도 횟수
retries_count
도입됨 GitLab 15.6에서job_webhook_retries_count
라는 플래그와 함께. 기본적으로 비활성화되어 있습니다.retries_count
자체 관리형에서 활성화됨 GitLab 16.2에서.
retries_count
는 작업이 재시도인지 여부를 나타내는 정수입니다. 0
은 작업이 재시도되지 않았음을 의미합니다. 1
은 첫 번째 재시도임을 의미합니다.
파이프라인 이름
commit.name
도입됨 GitLab 15.8에서.
workflow:name
으로 파이프라인의 사용자 지정 이름을 설정할 수 있습니다.
파이프라인에 이름이 있으면 그 이름이 commit.name
의 값입니다.
배포 이벤트
배포 이벤트는 배포가 발생할 때 트리거됩니다:
- 시작
- 성공
- 실패
- 취소됨
페이로드의 deployable_id
와 deployable_url
은 배포를 실행한 CI/CD 작업을 나타냅니다.
배포 이벤트가 API 또는 trigger
jobs에 의해 발생할 때, deployable_url
은 null
입니다.
요청 헤더:
X-Gitlab-Event: Deployment Hook
페이로드 예시:
{
"object_kind": "deployment",
"status": "success",
"status_changed_at":"2021-04-28 21:50:00 +0200",
"deployment_id": 15,
"deployable_id": 796,
"deployable_url": "http://10.126.0.2:3000/root/test-deployment-webhooks/-/jobs/796",
"environment": "staging",
"environment_tier": "staging",
"environment_slug": "staging",
"environment_external_url": "https://staging.example.com",
"project": {
"id": 30,
"name": "test-deployment-webhooks",
"description": "",
"web_url": "http://10.126.0.2:3000/root/test-deployment-webhooks",
"avatar_url": null,
"git_ssh_url": "ssh://vlad@10.126.0.2:2222/root/test-deployment-webhooks.git",
"git_http_url": "http://10.126.0.2:3000/root/test-deployment-webhooks.git",
"namespace": "Administrator",
"visibility_level": 0,
"path_with_namespace": "root/test-deployment-webhooks",
"default_branch": "master",
"ci_config_path": "",
"homepage": "http://10.126.0.2:3000/root/test-deployment-webhooks",
"url": "ssh://vlad@10.126.0.2:2222/root/test-deployment-webhooks.git",
"ssh_url": "ssh://vlad@10.126.0.2:2222/root/test-deployment-webhooks.git",
"http_url": "http://10.126.0.2:3000/root/test-deployment-webhooks.git"
},
"short_sha": "279484c0",
"user": {
"id": 1,
"name": "Administrator",
"username": "root",
"avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
"email": "admin@example.com"
},
"user_url": "http://10.126.0.2:3000/root",
"commit_url": "http://10.126.0.2:3000/root/test-deployment-webhooks/-/commit/279484c09fbe69ededfced8c1bb6e6d24616b468",
"commit_title": "새 파일 추가"
}
그룹 구성원 이벤트
- GitLab 17.4에 도입된 접근 요청 이벤트.
이 이벤트는 그룹 웹훅에 대해서만 트리거됩니다.
구성원 이벤트는 다음과 같은 경우에 트리거됩니다:
- 사용자가 그룹 구성원으로 추가됩니다.
- 사용자의 접근 수준이 변경됩니다.
- 사용자 접근의 만료 날짜가 업데이트됩니다.
- 사용자가 그룹에서 제거됩니다.
- 사용자가 그룹에 대한 접근을 요청합니다.
- 접근 요청이 거부됩니다.
그룹에 구성원 추가
요청 헤더:
X-Gitlab-Event: Member Hook
페이로드 예시:
{
"created_at": "2020-12-11T04:57:22Z",
"updated_at": "2020-12-11T04:57:22Z",
"group_name": "webhook-test",
"group_path": "webhook-test",
"group_id": 100,
"user_username": "test_user",
"user_name": "Test User",
"user_email": "testuser@webhooktest.com",
"user_id": 64,
"group_access": "Guest",
"group_plan": null,
"expires_at": "2020-12-14T00:00:00Z",
"event_name": "user_add_to_group"
}
구성원 접근 수준 또는 만료 날짜 업데이트
요청 헤더:
X-Gitlab-Event: Member Hook
페이로드 예시:
{
"created_at": "2020-12-11T04:57:22Z",
"updated_at": "2020-12-12T08:48:19Z",
"group_name": "webhook-test",
"group_path": "webhook-test",
"group_id": 100,
"user_username": "test_user",
"user_name": "Test User",
"user_email": "testuser@webhooktest.com",
"user_id": 64,
"group_access": "Developer",
"group_plan": null,
"expires_at": "2020-12-20T00:00:00Z",
"event_name": "user_update_for_group"
}
그룹에서 구성원 제거
요청 헤더:
X-Gitlab-Event: Member Hook
페이로드 예시:
{
"created_at": "2020-12-11T04:57:22Z",
"updated_at": "2020-12-12T08:52:34Z",
"group_name": "webhook-test",
"group_path": "webhook-test",
"group_id": 100,
"user_username": "test_user",
"user_name": "Test User",
"user_email": "testuser@webhooktest.com",
"user_id": 64,
"group_access": "Guest",
"group_plan": null,
"expires_at": "2020-12-14T00:00:00Z",
"event_name": "user_remove_from_group"
}
사용자가 접근 요청
- GitLab 17.4에서 도입됨
group_access_request_webhooks
라는 플래그와 함께. 기본적으로 비활성화됨.- GitLab 17.5에서 일반적으로 사용 가능. 기능 플래그
group_access_request_webhooks
제거됨.
요청 헤더:
X-Gitlab-Event: Member Hook
페이로드 예시:
{
"created_at": "2020-12-11T04:57:22Z",
"updated_at": "2020-12-12T08:52:34Z",
"group_name": "webhook-test",
"group_path": "webhook-test",
"group_id": 100,
"user_username": "test_user",
"user_name": "Test User",
"user_email": "testuser@webhooktest.com",
"user_id": 64,
"group_access": "Guest",
"group_plan": null,
"expires_at": "2020-12-14T00:00:00Z",
"event_name": "user_access_request_to_group"
}
액세스 요청이 거부되었습니다
- GitLab 17.4에서 도입됨 플래그와 함께
group_access_request_webhooks
라는 이름으로. 기본적으로 비활성화되어 있습니다.- GitLab 17.5에서 일반적으로 사용 가능합니다. 기능 플래그
group_access_request_webhooks
가 제거되었습니다.
요청 헤더:
X-Gitlab-Event: Member Hook
페이로드 예시:
{
"created_at": "2020-12-11T04:57:22Z",
"updated_at": "2020-12-12T08:52:34Z",
"group_name": "webhook-test",
"group_path": "webhook-test",
"group_id": 100,
"user_username": "test_user",
"user_name": "Test User",
"user_email": "testuser@webhooktest.com",
"user_id": 64,
"group_access": "Guest",
"group_plan": null,
"expires_at": "2020-12-14T00:00:00Z",
"event_name": "user_access_request_denied_for_group"
}
하위 그룹 이벤트
이 이벤트는 그룹 웹훅에서만 트리거됩니다.
하위 그룹 이벤트는 다음의 경우에 트리거됩니다:
그룹 내 하위 그룹 생성하기
요청 헤더:
X-Gitlab-Event: Subgroup Hook
페이로드 예시:
{
"created_at": "2021-01-20T09:40:12Z",
"updated_at": "2021-01-20T09:40:12Z",
"event_name": "subgroup_create",
"name": "subgroup1",
"path": "subgroup1",
"full_path": "group1/subgroup1",
"group_id": 10,
"parent_group_id": 7,
"parent_name": "group1",
"parent_path": "group1",
"parent_full_path": "group1"
}
그룹에서 하위 그룹 제거하기
이 웹훅은 하위 그룹이 새 부모 그룹으로 전송될 때 트리거되지 않습니다.
요청 헤더:
X-Gitlab-Event: Subgroup Hook
페이로드 예시:
{
"created_at": "2021-01-20T09:40:12Z",
"updated_at": "2021-01-20T09:40:12Z",
"event_name": "subgroup_destroy",
"name": "subgroup1",
"path": "subgroup1",
"full_path": "group1/subgroup1",
"group_id": 10,
"parent_group_id": 7,
"parent_name": "group1",
"parent_path": "group1",
"parent_full_path": "group1"
}
기능 플래그 이벤트
기능 플래그 이벤트는 기능 플래그가 켜지거나 꺼질 때 트리거됩니다.
요청 헤더:
X-Gitlab-Event: Feature Flag Hook
페이로드 예시:
{
"object_kind": "feature_flag",
"project": {
"id": 1,
"name":"Gitlab Test",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/gitlabhq/gitlab-test",
"avatar_url":null,
"git_ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
"git_http_url":"http://example.com/gitlabhq/gitlab-test.git",
"namespace":"GitlabHQ",
"visibility_level":20,
"path_with_namespace":"gitlabhq/gitlab-test",
"default_branch":"master",
"ci_config_path": null,
"homepage":"http://example.com/gitlabhq/gitlab-test",
"url":"http://example.com/gitlabhq/gitlab-test.git",
"ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
"http_url":"http://example.com/gitlabhq/gitlab-test.git"
},
"user": {
"id": 1,
"name": "관리자",
"username": "root",
"avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
"email": "admin@example.com"
},
"user_url": "http://example.com/root",
"object_attributes": {
"id": 6,
"name": "test-feature-flag",
"description": "test-feature-flag-description",
"active": true
}
}
릴리스 이벤트
- GitLab 16.5에서 도입된 릴리스 삭제 이벤트 introduce.
릴리스 이벤트는 릴리스가 생성되거나 업데이트되거나 삭제될 때 트리거됩니다.
페이로드에서 object_attributes.action
의 사용 가능한 값은 다음과 같습니다:
create
update
delete
요청 헤더:
X-Gitlab-Event: Release Hook
페이로드 예시:
{
"id": 1,
"created_at": "2020-11-02 12:55:12 UTC",
"description": "v1.1이 릴리즈되었습니다",
"name": "v1.1",
"released_at": "2020-11-02 12:55:12 UTC",
"tag": "v1.1",
"object_kind": "release",
"project": {
"id": 2,
"name": "release-webhook-example",
"description": "",
"web_url": "https://example.com/gitlab-org/release-webhook-example",
"avatar_url": null,
"git_ssh_url": "ssh://git@example.com/gitlab-org/release-webhook-example.git",
"git_http_url": "https://example.com/gitlab-org/release-webhook-example.git",
"namespace": "Gitlab",
"visibility_level": 0,
"path_with_namespace": "gitlab-org/release-webhook-example",
"default_branch": "master",
"ci_config_path": null,
"homepage": "https://example.com/gitlab-org/release-webhook-example",
"url": "ssh://git@example.com/gitlab-org/release-webhook-example.git",
"ssh_url": "ssh://git@example.com/gitlab-org/release-webhook-example.git",
"http_url": "https://example.com/gitlab-org/release-webhook-example.git"
},
"url": "https://example.com/gitlab-org/release-webhook-example/-/releases/v1.1",
"action": "create",
"assets": {
"count": 5,
"links": [
{
"id": 1,
"external": true, // GitLab 15.9에서 사용 중단되었으며 GitLab 16.0에서 제거될 예정입니다.
"link_type": "other",
"name": "변경 로그",
"url": "https://example.net/changelog"
}
],
"sources": [
{
"format": "zip",
"url": "https://example.com/gitlab-org/release-webhook-example/-/archive/v1.1/release-webhook-example-v1.1.zip"
},
{
"format": "tar.gz",
"url": "https://example.com/gitlab-org/release-webhook-example/-/archive/v1.1/release-webhook-example-v1.1.tar.gz"
},
{
"format": "tar.bz2",
"url": "https://example.com/gitlab-org/release-webhook-example/-/archive/v1.1/release-webhook-example-v1.1.tar.bz2"
},
{
"format": "tar",
"url": "https://example.com/gitlab-org/release-webhook-example/-/archive/v1.1/release-webhook-example-v1.1.tar"
}
]
},
"commit": {
"id": "ee0a3fb31ac16e11b9dbb596ad16d4af654d08f8",
"message": "릴리즈 v1.1",
"title": "릴리즈 v1.1",
"timestamp": "2020-10-31T14:58:32+11:00",
"url": "https://example.com/gitlab-org/release-webhook-example/-/commit/ee0a3fb31ac16e11b9dbb596ad16d4af654d08f8",
"author": {
"name": "예시 사용자",
"email": "user@example.com"
}
}
}
이모지 이벤트
- GitLab 16.2에서
emoji_webhooks
라는 플래그와 함께 도입됨. 기본적으로 비활성화되어 있음.- GitLab.com에서 활성화됨 (GitLab 16.3).
- 기본적으로 활성화됨 (GitLab 16.4).
- 일반적으로 사용 가능 (GitLab 17.5). 기능 플래그
emoji_webhooks
가 제거됨.
emoji_webhooks
플래그를 활성화하려면 이슈 417288를 참조하세요.이모지 이벤트는 이모지 반응이 추가되거나 제거될 때 트리거됩니다:
- 이슈
- 병합 요청
- 프로젝트 스니펫
- 코멘트:
- 이슈
- 병합 요청
- 프로젝트 스니펫
- 커밋
페이로드에서 object_attributes.action
의 사용 가능한 값은 다음과 같습니다:
-
award
반응 추가 -
revoke
반응 제거
요청 헤더:
X-Gitlab-Event: Emoji Hook
페이로드 예시:
{
"object_kind": "emoji",
"event_type": "award",
"user": {
"id": 1,
"name": "Blake Bergstrom",
"username": "root",
"avatar_url": "http://example.com/uploads/-/system/user/avatar/1/avatar.png",
"email": "[REDACTED]"
},
"project_id": 6,
"project": {
"id": 6,
"name": "Flight",
"description": "Velit fugit aperiam illum deleniti odio sequi.",
"web_url": "http://example.com/flightjs/Flight",
"avatar_url": null,
"git_ssh_url": "ssh://git@example.com/flightjs/Flight.git",
"git_http_url": "http://example.com/flightjs/Flight.git",
"namespace": "Flightjs",
"visibility_level": 20,
"path_with_namespace": "flightjs/Flight",
"default_branch": "master",
"ci_config_path": null,
"homepage": "http://example.com/flightjs/Flight",
"url": "ssh://git@example.com/flightjs/Flight.git",
"ssh_url": "ssh://git@example.com/flightjs/Flight.git",
"http_url": "http://example.com/flightjs/Flight.git"
},
"object_attributes": {
"user_id": 1,
"created_at": "2023-07-04 20:44:11 UTC",
"id": 1,
"name": "thumbsup",
"awardable_type": "Note",
"awardable_id": 363,
"updated_at": "2023-07-04 20:44:11 UTC",
"action": "award",
"awarded_on_url": "http://example.com/flightjs/Flight/-/issues/42#note_363"
},
"note": {
"attachment": null,
"author_id": 1,
"change_position": null,
"commit_id": null,
"created_at": "2023-07-04 15:09:55 UTC",
"discussion_id": "c3d97fd471f210a5dc8b97a409e3bea95ee06c14",
"id": 363,
"line_code": null,
"note": "Testing 123",
"noteable_id": 635,
"noteable_type": "Issue",
"original_position": null,
"position": null,
"project_id": 6,
"resolved_at": null,
"resolved_by_id": null,
"resolved_by_push": null,
"st_diff": null,
"system": false,
"type": null,
"updated_at": "2023-07-04 19:58:46 UTC",
"updated_by_id": null,
"description": "Testing 123",
"url": "http://example.com/flightjs/Flight/-/issues/42#note_363"
},
"issue": {
"author_id": 1,
"closed_at": null,
"confidential": false,
"created_at": "2023-07-04 14:59:43 UTC",
"description": "이슈 설명!",
"discussion_locked": null,
"due_date": null,
"id": 635,
"iid": 42,
"last_edited_at": null,
"last_edited_by_id": null,
"milestone_id": null,
"moved_to_id": null,
"duplicated_to_id": null,
"project_id": 6,
"relative_position": 18981,
"state_id": 1,
"time_estimate": 0,
"title": "새 이슈!",
"updated_at": "2023-07-04 15:09:55 UTC",
"updated_by_id": null,
"weight": null,
"health_status": null,
"url": "http://example.com/flightjs/Flight/-/issues/42",
"total_time_spent": 0,
"time_change": 0,
"human_total_time_spent": null,
"human_time_change": null,
"human_time_estimate": null,
"assignee_ids": [
1
],
"assignee_id": 1,
"labels": [
],
"state": "열림",
"severity": "알 수 없음"
}
}
프로젝트 및 그룹 액세스 토큰 이벤트
- GitLab 16.10에서
access_token_webhooks
라는 플래그와 함께 도입됨. 기본적으로 비활성화됨.- GitLab 16.11에서 GitLab.com에서 활성화됨.
- GitLab 16.11에서 일반 제공됨. 기능 플래그
access_token_webhooks
가 제거됨.- GitLab 17.4에서
full_path
속성 추가됨.
두 가지 액세스 토큰 만료 이벤트가 생성됩니다:
- 프로젝트 또는 그룹 액세스 토큰이 만료되기 7일 전.
- 토큰이 만료되기 1일 전.
페이로드에서 event_name
의 사용 가능한 값은 다음과 같습니다:
expiring_access_token
요청 헤더:
X-Gitlab-Event: Resource Access Token Hook
프로젝트에 대한 페이로드 예시:
{
"object_kind": "access_token",
"project": {
"id": 7,
"name": "Flight",
"description": "Eum dolore maxime atque reprehenderit voluptatem.",
"web_url": "https://example.com/flightjs/Flight",
"avatar_url": null,
"git_ssh_url": "ssh://git@example.com/flightjs/Flight.git",
"git_http_url": "https://example.com/flightjs/Flight.git",
"namespace": "Flightjs",
"visibility_level": 0,
"path_with_namespace": "flightjs/Flight",
"default_branch": "master",
"ci_config_path": null,
"homepage": "https://example.com/flightjs/Flight",
"url": "ssh://git@example.com/flightjs/Flight.git",
"ssh_url": "ssh://git@example.com/flightjs/Flight.git",
"http_url": "https://example.com/flightjs/Flight.git"
},
"object_attributes": {
"user_id": 90,
"created_at": "2024-01-24 16:27:40 UTC",
"id": 25,
"name": "acd",
"expires_at": "2024-01-26"
},
"event_name": "expiring_access_token"
}
그룹에 대한 페이로드 예시:
{
"object_kind": "access_token",
"group": {
"group_name": "Twitter",
"group_path": "twitter",
"group_id": 35,
"full_path": "twitter"
},
"object_attributes": {
"user_id": 90,
"created_at": "2024-01-24 16:27:40 UTC",
"id": 25,
"name": "acd",
"expires_at": "2024-01-26"
},
"event_name": "expiring_access_token"
}