InfoGrab DocsInfoGrab Docs

Webhook 이벤트

요약

- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated 웹훅을 사용하여 GitLab을 외부 애플리케이션에 연결하고 워크플로를 자동화하세요. 이 페이지에서는 프로젝트 웹훅 및 그룹 웹훅에 대해 트리거되는 이벤트 목록을 안내합니다.


Webhook 이벤트#

  - 
  Tier: Free, Premium, Ultimate

- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

웹훅을 사용하여 GitLab을 외부 애플리케이션에 연결하고 워크플로를 자동화하세요. GitLab에서 특정 이벤트가 발생하면, 웹훅이 설정된 엔드포인트로 상세 정보를 담은 HTTP POST 요청을 전송합니다. 코드 변경, 배포, 댓글, 기타 활동에 반응하는 자동화 프로세스를 구축하여 수동 개입 없이 작업을 처리할 수 있습니다.

이 페이지에서는 프로젝트 웹훅그룹 웹훅에 대해 트리거되는 이벤트 목록을 안내합니다.

시스템 웹훅에 대해 트리거되는 이벤트 목록은 시스템 웹훅을 참고하세요.

프로젝트 및 그룹 웹훅 모두에서 트리거되는 이벤트#

이벤트 유형 트리거 조건
댓글 이벤트 커밋, 머지 리퀘스트, 이슈, 코드 스니펫에 새 댓글이 작성되거나 편집될 때. 1
배포 이벤트 배포가 시작, 성공, 실패, 또는 취소될 때.
이모지 이벤트 이모지 반응이 추가되거나 제거될 때.
피처 플래그 이벤트 피처 플래그가 켜지거나 꺼질 때.
Job 이벤트 job 상태가 변경될 때.
머지 리퀘스트 이벤트 머지 리퀘스트가 생성, 편집, 머지, 또는 닫히거나, 소스 브랜치에 커밋이 추가될 때.
마일스톤 이벤트 마일스톤이 생성, 닫힘, 다시 열림, 또는 삭제될 때.
파이프라인 이벤트 파이프라인 상태가 변경될 때.
프로젝트 또는 그룹 액세스 토큰 이벤트 프로젝트 또는 그룹 액세스 토큰이 7일, 30일, 또는 60일 후 만료될 예정일 때.
푸시 이벤트 리포지터리에 푸시가 발생할 때.
릴리즈 이벤트 릴리즈가 생성, 편집, 또는 삭제될 때.
태그 이벤트 리포지터리에서 태그가 생성되거나 삭제될 때.
취약점 이벤트 취약점이 생성되거나 업데이트될 때.
위키 페이지 이벤트 위키 페이지가 생성, 편집, 또는 삭제될 때.
작업 항목 이벤트 새 작업 항목이 생성되거나, 기존 항목이 편집, 닫힘, 또는 다시 열릴 때.

각주:

  • GitLab 16.11에서 댓글 편집 시 댓글 이벤트가 트리거되도록 도입됨.

그룹 웹훅에서만 트리거되는 이벤트#

이벤트 유형 트리거 조건
그룹 멤버 이벤트 사용자가 그룹에 추가되거나 제거될 때, 또는 사용자의 액세스 레벨이나 액세스 만료일이 변경될 때.
프로젝트 이벤트 그룹 내에서 프로젝트가 생성되거나 삭제될 때.
하위 그룹 이벤트 하위 그룹이 그룹에 생성되거나 제거될 때.
작성자가 [GitLab 프로필](https://gitlab.com/-/user_settings/profile)에 공개 이메일을 등록하지 않은 경우,

웹훅 페이로드의 email 속성 값은 [REDACTED]로 표시됩니다.

푸시 이벤트#

다음의 경우를 제외하고, 리포지터리에 푸시할 때 푸시 이벤트가 트리거됩니다:

  • 태그를 푸시하는 경우.

  • 단일 푸시에 기본적으로 3개를 초과하는 브랜치의 변경 사항이 포함된 경우 (push_event_hooks_limit 설정 에 따라 다름).

한 번에 20개 이상의 커밋을 푸시하면, 페이로드의 commits 속성에는 최신 커밋 20개의 정보만 포함됩니다. 상세 커밋 데이터를 로드하는 것은 비용이 많이 들기 때문에, 이 제한은 성능상의 이유로 존재합니다. total_commits_count 속성에는 실제 커밋 수가 포함됩니다.

별도의 설정인 `push_event_activities_limit`은 GitLab이 활동 피드에

개별 푸시 이벤트를 생성할지, 아니면 일괄 푸시 이벤트를 생성할지를 제어합니다. 자세한 내용은 푸시 이벤트 활동 제한을 참고하세요.

새 커밋 없이 브랜치를 생성하고 푸시하면, 페이로드의 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",
  "message": "Hello World",
  "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",
    "ci_config_path": null,
    "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"
  },
  "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_options": {},
  "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
  }
}

태그 이벤트#

태그 이벤트는 리포지터리에서 태그를 생성하거나 삭제할 때 트리거됩니다.

기본적으로 단일 푸시에 세 개를 초과하는 태그에 대한 변경 사항이 포함된 경우에는 이 훅이 실행되지 않습니다. 이 제한은 push_event_hooks_limit 설정(기본값: 3)으로 제어되며, 태그와 브랜치 모두에 적용됩니다. 제한을 초과하면 해당 푸시 이벤트에 대한 웹훅이 전혀 트리거되지 않습니다.

GitLab Self-Managed 인스턴스의 경우, 관리자는 애플리케이션 Settings API를 사용하여 이 제한을 수정할 수 있습니다.

요청 헤더:

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",
  "message": "Tag message",
  "user_id": 1,
  "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": 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",
    "ci_config_path": null,
    "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"
  },
  "commits": [],
  "total_commits_count": 0,
  "push_options": {},
  "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
  }
}

작업 항목 이벤트#

History

작업 항목 이벤트는 작업 항목이 생성, 편집, 닫힘 또는 다시 열림 상태가 될 때 트리거됩니다. 지원되는 작업 항목 유형은 다음과 같습니다:

이슈 및 Service Desk 이슈의 경우 object_kindissue이고 typeIssue입니다. 그 외 모든 작업 항목의 경우 object_kind 필드는 work_item이고 type은 해당 작업 항목 유형입니다.

작업 항목 유형이 Epic인 경우, 변경 사항에 대한 이벤트를 수신하려면 웹훅을 그룹에 등록해야 합니다.

페이로드에서 object_attributes.action에 사용 가능한 값은 다음과 같습니다:

  • open

  • close

  • reopen

  • update

assigneeassignee_id 키는 더 이상 사용되지 않으며(deprecated) 첫 번째 담당자만 포함합니다.

escalation_statusescalation_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&d=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,
    "start_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&d=identicon"
  }],
  "assignee": {
    "name": "User1",
    "username": "user1",
    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40&d=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
      }]
    }
  }
}

댓글 이벤트#

History

댓글 이벤트는 커밋, 머지 리퀘스트, 이슈, 코드 스니펫에 새 댓글이 작성되거나 편집될 때 트리거됩니다.

노트 데이터는 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&d=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,
    "internal": false,
    "note": "This is a commit comment. How does this work?",
    "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 <user@example.com.com>\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": "Administrator",
    "username": "root",
    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40&d=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://localhost/gitlab-org/gitlab-test.git",
    "description": "Aut reprehenderit ut est.",
    "homepage": "http://example.com/gitlab-org/gitlab-test"
  },
  "object_attributes": {
    "id": 1244,
    "internal": false,
    "note": "This MR needs work.",
    "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 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"
    },
    "target": {
      "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"
    },
    "last_commit": {
      "id": "562e173be03b8ff2efb05345d12df18815438a4b",
      "message": "Merge branch 'another-branch' into 'master'\n\nCheck in this test\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": "User1",
      "username": "user1",
      "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40&d=identicon"
    },
    "detailed_merge_status": "checking"
  }
}

이슈에 댓글 작성#

  • assignee_id 필드는 더 이상 사용되지 않으며 첫 번째 담당자만 표시됩니다.

  • 기밀 이슈의 경우 event_typeconfidential_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&d=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,
    "internal": false,
    "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&d=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,
    "internal": false,
    "note": "Is this snippet doing what it's supposed to be doing?",
    "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"
  }
}

머지 리퀘스트 이벤트#

머지 리퀘스트 이벤트는 다음과 같은 경우에 트리거됩니다:

  • 새 머지 리퀘스트가 생성됨.

  • 기존 머지 리퀘스트가 업데이트, 승인(모든 필수 승인자에 의해), 미승인, 병합, 또는 종료됨.

  • 개별 사용자가 기존 머지 리퀘스트에 승인을 추가하거나 취소함.

  • 리뷰어가 머지 리퀘스트 리뷰를 재요청받음.

  • 소스 브랜치에 커밋이 추가됨.

  • 머지 리퀘스트의 모든 스레드가 해결됨.

머지 리퀘스트 이벤트는 changes 필드가 비어 있는 경우에도 트리거될 수 있습니다. 웹훅 수신자는 항상 changes 필드의 내용을 검사하여 머지 리퀘스트의 실제 변경 사항을 확인해야 합니다.

페이로드 구조#

웹훅 페이로드의 JSON 구조는 모든 액션 유형에서 일관됩니다. 차이점은 어느 필드에 데이터가 포함되는지, 그리고 oldrev, system, system_action과 같은 조건부 필드가 존재하는지 여부입니다.

페이로드에서 object_attributes.action에 사용 가능한 값은 다음과 같습니다:

  • open: 머지 리퀘스트가 생성됨.

  • close: 머지 리퀘스트가 종료됨.

  • reopen: 종료된 머지 리퀘스트가 재개됨.

  • update: 머지 리퀘스트가 업데이트됨. 일반적인 업데이트와 리뷰 재요청 액션이 포함됩니다. 구체적인 업데이트 유형을 확인하려면 changes 필드를 참조하세요.

  • approval: 사용자가 승인을 추가함.

  • approved: 모든 필수 승인자에 의해 머지 리퀘스트가 완전히 승인됨.

  • unapproval: 사용자가 수동으로 또는 시스템에 의해 승인을 취소함.

  • unapproved: 이전에 승인된 머지 리퀘스트가 수동 또는 시스템에 의해 승인 상태를 잃습니다.

  • merge: 머지 리퀘스트가 머지됩니다.

머지 리퀘스트 웹훅 페이로드에는 다음과 같은 최상위 필드가 포함됩니다:

Field Type Description
object_kind String "merge_request"
event_type String "merge_request"
user Object 이벤트를 트리거한 사용자.
project Object 타깃 프로젝트.
object_attributes Object 머지 리퀘스트 데이터.
changes Object 작업 중에 변경된 속성을 포함합니다.
assignees Array 현재 할당된 사용자.
reviewers Array 현재 할당된 리뷰어.
labels Array 라벨 객체.
repository Object 더 이상 사용되지 않습니다. 대신 project를 사용하세요. 리포지터리 정보.

더 이상 사용되지 않는 필드#

다음 필드는 더 이상 사용되지 않으며 하위 호환성을 위해서만 포함됩니다. 대신 권장 대안을 사용하세요:

Deprecated field Recommended alternative
object_attributes.assignee_id object_attributes.assignee_ids
object_attributes.work_in_progress object_attributes.draft
project.http_url project.git_http_url
project.homepage project.web_url
project.ssh_url project.git_ssh_url
project.url project.git_ssh_url or project.git_http_url
repository project

object_attributes 필드#

History

object_attributes 필드에는 머지 리퀘스트의 현재 상태가 포함됩니다. 다음 필드가 포함됩니다:

Field Type Description
action String 웹훅을 트리거한 작업. 예: open, update, merge.
actioned_at String 웹훅을 트리거한 작업이 발생한 시각.
approval_rules Array 승인 규칙 객체 배열 (EE 전용).
assignee_ids Array 담당자 ID 배열.
author_id Integer 머지 리퀘스트 작성자의 ID.
blocking_discussions_resolved Boolean 차단 중인 토론이 해결되었는지 여부.
created_at String 머지 리퀘스트가 생성된 시각.
description String 머지 리퀘스트 설명.
detailed_merge_status String 상세 머지 상태 정보. 가능한 값 목록은 머지 상태를 참조하세요.
draft Boolean 머지 리퀘스트가 드래프트인지 여부.
first_contribution Boolean 작성자의 첫 번째 기여인지 여부.
head_pipeline_id Integer 헤드 파이프라인의 ID.
human_time_change String 사람이 읽을 수 있는 형식의 시간 변경 값.
human_time_estimate String 사람이 읽을 수 있는 형식의 예상 시간.
human_total_time_spent String 사람이 읽을 수 있는 형식의 총 소요 시간.
id Integer 머지 리퀘스트 ID.
iid Integer 머지 리퀘스트의 내부 ID.
labels Array 라벨 객체 배열.
last_commit Object 세부 정보가 포함된 마지막 커밋 객체.
last_edited_at String 머지 리퀘스트가 마지막으로 편집된 시각.
last_edited_by_id Integer 마지막으로 편집한 사용자의 ID.
merge_commit_sha String 머지 커밋의 SHA.
merged_at String 머지 리퀘스트가 머지된 시각. 아직 머지되지 않은 경우 null.
merge_error String 머지 오류 메시지.
merge_params Object 머지 파라미터.
merge_status String 머지 리퀘스트의 상태.
merge_user_id Integer 머지한 사용자의 ID.
merge_when_pipeline_succeeds Boolean 자동 머지가 활성화되었는지 여부.
milestone_id Integer 마일스톤의 ID.
oldrev String 이전 커밋 SHA (푸시 관련 이벤트에서만 존재).
prepared_at String 머지 리퀘스트가 준비된 타임스탬프. 모든 준비 단계가 완료된 후 한 번만 채워지며, 추가 변경이 있어도 업데이트되지 않습니다.
reviewer_ids Array 리뷰어 ID 배열.
source_branch String 소스 브랜치 이름.
source Object 소스 프로젝트 세부 정보. 예: 이름 및 설명.
source_project_id Integer 소스 프로젝트의 ID.
squash_commit_sha String 스쿼시 커밋의 SHA. 머지 리퀘스트가 스쿼시로 머지될 때만 존재합니다.
state_id Integer 상태 ID (1: opened, 2: closed, 3: merged, 4: locked).
state String 머지 리퀘스트의 상태 (opened, closed, merged, locked).
system_action String 시스템 작업 (system이 true인 경우에만 존재).
system Boolean 이벤트가 시스템에 의해 시작되었는지 여부.
target_branch String 타깃 브랜치 이름.
target Object 타깃 프로젝트 세부 정보. 예: 이름 및 설명.
target_project_id Integer 타깃 프로젝트의 ID.
time_change Integer 초 단위 소요 시간 변경 값.
time_estimate Integer 초 단위 예상 시간.
title String 머지 리퀘스트 제목.
total_time_spent Integer 초 단위 총 소요 시간.
updated_at String 머지 리퀘스트가 마지막으로 업데이트된 시각.
updated_by_id Integer 마지막으로 업데이트한 사용자의 ID.
url String 머지 리퀘스트의 URL.

changes 필드#

changes 필드에는 작업 중에 수정된 필드만 포함됩니다. object_attributes의 모든 필드가 changes에 나타나지는 않습니다.

변경된 각 필드는 다음 형식을 따릅니다:

{
  "field_name": {
    "previous": "old_value",
    "current": "new_value"
  }
}

Attributes#

  • assignees

  • blocking_discussions_resolved

  • description

  • draft

  • head_pipeline_id

  • labels

  • last_edited_at

  • last_edited_by_id

  • merge_commit_sha

  • merge_error

  • merge_params

  • merge_status

  • merge_user_id

  • merge_when_pipeline_succeeds

  • milestone_id

  • prepared_at

  • reviewer_ids

  • reviewers

  • squash_commit_sha

  • state_id

  • target_branch

  • time_change

  • time_estimate

  • title

  • total_time_spent

  • updated_at

  • updated_by_id

머지 리퀘스트 액션별 필드#

object_attributes.oldrev 필드는 다음과 같이 실제 코드 변경이 있을 때 update 액션에서만 사용 가능합니다:

  • 소스 브랜치에 새 코드가 푸시된 경우.

  • 제안 사항이 적용된 경우.

다음 예시는 oldrev가 포함된 update 이벤트(부분 페이로드)를 나타냅니다:

{
  "object_kind": "merge_request",
  "event_type": "merge_request",
  "object_attributes": {
    "action": "update",
    "oldrev": "e59094b8de0f2f91abbe4760a52d9137260252d8"
  }
}

시스템에 의해 시작된 머지 리퀘스트 이벤트#

일부 머지 리퀘스트 이벤트는 새 커밋 푸시로 인해 승인이 초기화되는 경우처럼 시스템에 의해 자동으로 트리거됩니다. 이러한 시스템 시작 웹훅 이벤트는 푸시 이벤트에 의해서만 트리거되며, 페이로드에 다음과 같은 추가 필드가 포함됩니다:

object_attributes.system: 불리언 필드입니다. true이면 시스템에 의해 이벤트가 트리거된 것이고, false이면 사용자 액션에 의해 이벤트가 트리거된 것입니다.

object_attributes.system_action: systemtrue일 때만 존재하는 문자열 필드입니다. 시스템 액션에 대한 추가 컨텍스트를 제공합니다. 사용 가능한 값은 다음과 같습니다:

approvals_reset_on_push: 프로젝트에서 푸시 시 승인 초기화가 활성화되어 있으며, 새 커밋이 푸시된 경우입니다.

  • code_owner_approvals_reset_on_push: 프로젝트에서 선택적 코드 소유자 제거가 활성화되어 있으며, CODEOWNERS 규칙과 일치하는 파일 변경으로 인해 Code Owner 승인이 초기화된 경우입니다.

다른 승인 초기화 시나리오는 웹훅을 트리거하지 않습니다.

다음 예시는 시스템 시작 이벤트(부분 페이로드)를 나타냅니다:

{
  "object_kind": "merge_request",
  "event_type": "merge_request",
  "object_attributes": {
    "action": "update",
    "system": true,
    "system_action": "approvals_reset_on_push"
  }
}

리뷰어 상태 추적#

머지 리퀘스트 웹훅 페이로드의 reviewers 배열에는 각 리뷰어에 대한 state 필드가 포함됩니다. state 필드는 리뷰어의 현재 리뷰 상태를 나타냅니다:

  • unreviewed: 리뷰어가 아직 머지 리퀘스트를 검토하지 않은 상태입니다.

  • review_started: 리뷰어가 리뷰를 시작했지만 완료하지 않은 상태입니다.

  • reviewed: 리뷰어가 리뷰를 완료함

  • requested_changes: 리뷰어가 변경 사항을 요청함

  • approved: 리뷰어가 머지 리퀘스트를 승인함

  • unapproved: 리뷰어가 이전에 승인했으나 승인이 취소됨

다음 예시는 reviewers 배열을 보여줍니다(부분 페이로드):

{
  "reviewers": [
    {
      "id": 6,
      "name": "User1",
      "username": "user1",
      "state": "unreviewed",
      "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
      "email": "user1@example.com"
    }
  ]
}

리뷰 재요청 이벤트#

머지 리퀘스트에서 리뷰어에게 리뷰가 재요청되면, changes 객체에 향상된 정보를 포함한 action: "update" 웹훅이 트리거됩니다. changes 페이로드에는 다음이 포함됩니다:

  • 이전 상태 (첫 번째 배열): 재요청 전 리뷰어의 상태를 나타내며, re_requested: false가 설정됨

  • 현재 상태 (두 번째 배열): 재요청 후 리뷰어의 업데이트된 상태를 나타내며, 재요청된 리뷰어에 대해 re_requested: true가 설정됨

  • 상태 전환: 리뷰어의 상태가 어떻게 변경되었는지를 보여줌(예: approved에서 unreviewed로)

다음 예시는 리뷰 재요청 변경 내용을 보여줍니다(부분 페이로드):

{
  "object_kind": "merge_request",
  "event_type": "merge_request",
  "object_attributes": {
    "action": "update"
  },
  "changes": {
    "reviewers": [
      [
        {
          "id": 6,
          "name": "User1",
          "username": "user1",
          "state": "approved",
          "re_requested": false,
          "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
          "email": "user1@example.com"
        }
      ],
      [
        {
          "id": 6,
          "name": "User1",
          "username": "user1",
          "state": "unreviewed",
          "re_requested": true,
          "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
          "email": "user1@example.com"
        }
      ]
    ]
  }
}

전체 페이로드 예시#

요청 헤더:

X-Gitlab-Event: Merge Request Hook

다음 예시는 open 액션에 대한 전체 머지 리퀘스트 웹훅 페이로드입니다. 명확성을 위해 더 이상 사용되지 않는 필드는 생략되었습니다. 더 이상 사용되지 않는 필드 목록과 권장 대안은 더 이상 사용되지 않는 필드를 참조하세요.

{
  "object_kind": "merge_request",
  "event_type": "merge_request",
  "user": {
    "id": 1,
    "name": "Alex Garcia",
    "username": "agarcia",
    "avatar_url": "https://www.gravatar.com/avatar/1a29da0ccd099482194440fac762f5ccb4ec53227761d1859979367644a889a5?s=80&d=identicon",
    "email": "agarcia@example.com"
  },
  "project": {
    "id": 2,
    "name": "Flight Management",
    "description": "Flight management application for tracking aircraft status.",
    "web_url": "http://gitlab.example.com/flightjs/flight-management",
    "avatar_url": null,
    "git_ssh_url": "ssh://git@gitlab.example.com:flightjs/flight-management.git",
    "git_http_url": "http://gitlab.example.com/flightjs/flight-management.git",
    "namespace": "Flightjs",
    "visibility_level": 0,
    "path_with_namespace": "flightjs/flight-management",
    "default_branch": "main",
    "ci_config_path": null
  },
  "object_attributes": {
    "author_id": 1,
    "created_at": "2026-01-16 05:56:22 UTC",
    "description": "This merge request adds input validation to the booking form.",
    "draft": false,
    "head_pipeline_id": null,
    "id": 93,
    "iid": 16,
    "last_edited_at": null,
    "last_edited_by_id": null,
    "merge_commit_sha": null,
    "merged_at": null,
    "merge_error": null,
    "merge_params": {
      "force_remove_source_branch": "1"
    },
    "merge_status": "checking",
    "merge_user_id": null,
    "merge_when_pipeline_succeeds": false,
    "milestone_id": 8,
    "source_branch": "feature/booking-validation",
    "source_project_id": 2,
    "squash_commit_sha": null,
    "state_id": 1,
    "target_branch": "main",
    "target_project_id": 2,
    "time_estimate": 0,
    "title": "Add input validation to booking form",
    "updated_at": "2026-01-16 05:56:25 UTC",
    "updated_by_id": null,
    "prepared_at": "2026-01-16 05:56:25 UTC",
    "assignee_ids": [
      1
    ],
    "blocking_discussions_resolved": true,
    "detailed_merge_status": "checking",
    "first_contribution": true,
    "human_time_change": null,
    "human_time_estimate": null,
    "human_total_time_spent": null,
    "labels": [
      {
        "id": 19,
        "title": "enhancement",
        "color": "#adb21a",
        "project_id": null,
        "created_at": "2026-01-07 00:03:52 UTC",
        "updated_at": "2026-01-07 00:03:52 UTC",
        "template": false,
        "description": null,
        "type": "GroupLabel",
        "group_id": 24
      }
    ],
    "last_commit": {
      "id": "e59094b8de0f2f91abbe4760a52d9137260252d8",
      "message": "Add email format validation",
      "title": "Add email format validation",
      "timestamp": "2026-01-16T05:01:10+00:00",
      "url": "http://gitlab.example.com/flightjs/flight-management/-/commit/e59094b8de0f2f91abbe4760a52d9137260252d8",
      "author": {
        "name": "Alex Garcia",
        "email": "agarcia@example.com"
      }
    },
    "reviewer_ids": [
      25
    ],
    "source": {
      "id": 2,
      "name": "Flight Management",
      "description": "Flight management application for tracking aircraft status.",
      "web_url": "http://gitlab.example.com/flightjs/flight-management",
      "avatar_url": null,
      "git_ssh_url": "ssh://git@gitlab.example.com:flightjs/flight-management.git",
      "git_http_url": "http://gitlab.example.com/flightjs/flight-management.git",
      "namespace": "Flightjs",
      "visibility_level": 0,
      "path_with_namespace": "flightjs/flight-management",
      "default_branch": "main",
      "ci_config_path": null
    },
    "state": "opened",
    "system": false,
    "target": {
      "id": 2,
      "name": "Flight Management",
      "description": "Flight management application for tracking aircraft status.",
      "web_url": "http://gitlab.example.com/flightjs/flight-management",
      "avatar_url": null,
      "git_ssh_url": "ssh://git@gitlab.example.com:flightjs/flight-management.git",
      "git_http_url": "http://gitlab.example.com/flightjs/flight-management.git",
      "namespace": "Flightjs",
      "visibility_level": 0,
      "path_with_namespace": "flightjs/flight-management",
      "default_branch": "main",
      "ci_config_path": null
    },
    "time_change": 0,
    "total_time_spent": 0,
    "url": "http://gitlab.example.com/flightjs/flight-management/-/merge_requests/16",
    "approval_rules": [
      {
        "id": 4,
        "approvals_required": 0,
        "name": "All Members",
        "rule_type": "any_approver",
        "report_type": null,
        "merge_request_id": 93,
        "section": null,
        "modified_from_project_rule": false,
        "orchestration_policy_idx": null,
        "vulnerabilities_allowed": 0,
        "scanners": [],
        "severity_levels": [],
        "vulnerability_states": [
          "new_needs_triage",
          "new_dismissed"
        ],
        "security_orchestration_policy_configuration_id": null,
        "scan_result_policy_id": null,
        "applicable_post_merge": null,
        "project_id": 2,
        "approval_policy_rule_id": null,
        "updated_at": "2026-01-16 05:56:22 UTC",
        "created_at": "2026-01-16 05:56:22 UTC"
      }
    ],
    "action": "open",
    "actioned_at": "2026-01-16 05:56:26 UTC"
  },
  "labels": [
    {
      "id": 19,
      "title": "enhancement",
      "color": "#adb21a",
      "project_id": null,
      "created_at": "2026-01-07 00:03:52 UTC",
      "updated_at": "2026-01-07 00:03:52 UTC",
      "template": false,
      "description": null,
      "type": "GroupLabel",
      "group_id": 24
    }
  ],
  "changes": {
    "merge_status": {
      "previous": "preparing",
      "current": "checking"
    },
    "updated_at": {
      "previous": "2026-01-16 05:56:22 UTC",
      "current": "2026-01-16 05:56:25 UTC"
    },
    "prepared_at": {
      "previous": null,
      "current": "2026-01-16 05:56:25 UTC"
    }
  },
  "assignees": [
    {
      "id": 1,
      "name": "Alex Garcia",
      "username": "agarcia",
      "avatar_url": "https://www.gravatar.com/avatar/1a29da0ccd099482194440fac762f5ccb4ec53227761d1859979367644a889a5?s=80&d=identicon",
      "email": "[REDACTED]"
    }
  ],
  "reviewers": [
    {
      "id": 25,
      "name": "Sidney Jones",
      "username": "sjones",
      "avatar_url": "https://www.gravatar.com/avatar/1be419860e7f852e20ca2691e6b55949f7809177e7765181da42e4448491e367?s=80&d=identicon",
      "email": "[REDACTED]",
      "state": "unreviewed",
      "re_requested": false
    }
  ]
}
`assignee_id`와 `merge_status` 필드는 [더 이상 사용되지 않습니다](/19.1/api/merge_requests/).

Wiki 페이지 이벤트#

Wiki 페이지 이벤트는 Wiki 페이지가 생성, 업데이트 또는 삭제될 때 트리거됩니다.

요청 헤더:

X-Gitlab-Event: Wiki Page Hook

페이로드 예시:

{
  "object_kind": "wiki_page",
  "user": {
    "id": 1,
    "name": "Administrator",
    "username": "root",
    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
    "email": "admin@example.com"
  },
  "project": {
    "id": 1,
    "name": "awesome-project",
    "description": "This is awesome",
    "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": "Awesome",
    "content": "awesome content goes here",
    "format": "markdown",
    "message": "adding an awesome page to the wiki",
    "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": "Pipeline for branch: master",
    "ref": "master",
    "tag": false,
    "sha": "bcbb5ec396a2c0f828686f14fac9b80b780504f2",
    "before_sha": "bcbb5ec396a2c0f828686f14fac9b80b780504f2",
    "source": "merge_request_event",
    "status": "success",
    "detailed_status": "passed",
    "stages": [
      "build",
      "test",
      "deploy"
    ],
    "created_at": "2016-08-12 15:23:28 UTC",
    "finished_at": "2016-08-12 15:26:29 UTC",
    "duration": 63,
    "queued_duration": 10,
    "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": "Test",
    "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": "Administrator",
    "username": "root",
    "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
    "email": "user_email@gitlab.com"
  },
  "project": {
    "id": 1,
    "name": "Gitlab Test",
    "description": "Atque in sunt eos similique dolores voluptatem.",
    "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",
    "ci_config_path": null
  },
  "commit": {
    "id": "bcbb5ec396a2c0f828686f14fac9b80b780504f2",
    "message": "test\n",
    "title": "test",
    "timestamp": "2016-08-12T17:23:21+02:00",
    "url": "http://example.com/gitlab-org/gitlab-test/commit/bcbb5ec396a2c0f828686f14fac9b80b780504f2",
    "author": {
      "name": "User",
      "email": "user@gitlab.com"
    }
  },
  "builds": [
    {
      "id": 380,
      "stage": "deploy",
      "name": "production",
      "status": "skipped",
      "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",
      "manual": true,
      "allow_failure": false,
      "user": {
        "id": 1,
        "name": "Administrator",
        "username": "root",
        "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
        "email": "admin@example.com"
      },
      "runner": null,
      "artifacts_file": {
        "filename": null,
        "size": null
      },
      "environment": {
        "name": "production",
        "action": "start",
        "deployment_tier": "production"
      }
    },
    {
      "id": 377,
      "stage": "test",
      "name": "test-image",
      "status": "success",
      "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": "on_success",
      "manual": false,
      "allow_failure": false,
      "user": {
        "id": 1,
        "name": "Administrator",
        "username": "root",
        "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
        "email": "admin@example.com"
      },
      "runner": {
        "id": 380987,
        "description": "shared-runners-manager-6.gitlab.com",
        "runner_type": "instance_type",
        "active": true,
        "is_shared": true,
        "tags": [
          "linux",
          "docker",
          "shared-runner"
        ]
      },
      "artifacts_file": {
        "filename": null,
        "size": null
      },
      "environment": null
    },
    {
      "id": 378,
      "stage": "test",
      "name": "test-build",
      "status": "failed",
      "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": "script_failure",
      "when": "on_success",
      "manual": false,
      "allow_failure": false,
      "user": {
        "id": 1,
        "name": "Administrator",
        "username": "root",
        "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
        "email": "admin@example.com"
      },
      "runner": {
        "id": 380987,
        "description": "shared-runners-manager-6.gitlab.com",
        "runner_type": "instance_type",
        "active": true,
        "is_shared": true,
        "tags": [
          "linux",
          "docker"
        ]
      },
      "artifacts_file": {
        "filename": null,
        "size": null
      },
      "environment": null
    },
    {
      "id": 376,
      "stage": "build",
      "name": "build-image",
      "status": "success",
      "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": "on_success",
      "manual": false,
      "allow_failure": false,
      "user": {
        "id": 1,
        "name": "Administrator",
        "username": "root",
        "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
        "email": "admin@example.com"
      },
      "runner": {
        "id": 380987,
        "description": "shared-runners-manager-6.gitlab.com",
        "runner_type": "instance_type",
        "active": true,
        "is_shared": true,
        "tags": [
          "linux",
          "docker"
        ]
      },
      "artifacts_file": {
        "filename": null,
        "size": null
      },
      "environment": null
    },
    {
      "id": 379,
      "stage": "deploy",
      "name": "staging",
      "status": "created",
      "created_at": "2016-08-12 15:23:28 UTC",
      "started_at": null,
      "finished_at": null,
      "duration": null,
      "queued_duration": null,
      "failure_reason": null,
      "when": "on_success",
      "manual": false,
      "allow_failure": false,
      "user": {
        "id": 1,
        "name": "Administrator",
        "username": "root",
        "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
        "email": "admin@example.com"
      },
      "runner": null,
      "artifacts_file": {
        "filename": null,
        "size": null
      },
      "environment": {
        "name": "staging",
        "action": "start",
        "deployment_tier": "staging"
      }
    }
  ],
  "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
  }
}

Job 이벤트#

Job 이벤트는 job의 상태가 변경될 때 트리거됩니다. 트리거 job은 제외됩니다.

페이로드의 commit.id는 커밋의 ID가 아닌 파이프라인의 ID입니다.

GitLab 15.1 이후부터, 차단된 사용자에 의해 트리거된 job 이벤트는 처리되지 않습니다.

요청 헤더:

X-Gitlab-Event: Job Hook

페이로드 예시:

{
  "object_kind": "build",
  "ref": "gitlab-script-trigger",
  "tag": false,
  "before_sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
  "sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
  "retries_count": 2,
  "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_created_at_iso": "2021-02-23T02:41:37Z",
  "build_started_at_iso": null,
  "build_finished_at_iso": null,
  "build_duration": null,
  "build_queued_duration": 1095.588715,
  "build_allow_failure": false,
  "build_failure_reason": "unknown_failure",
  "pipeline_id": 2366,
  "runner": {
    "id": 380987,
    "description": "shared-runners-manager-6.gitlab.com",
    "runner_type": "project_type",
    "active": true,
    "is_shared": false,
    "tags": [
      "linux",
      "docker"
    ]
  },
  "project_id": 380,
  "project_name": "gitlab-org/gitlab-test",
  "user": {
    "id": 3,
    "name": "User",
    "username": "user",
    "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
    "email": "user@gitlab.com"
  },
  "commit": {
    "id": 2366,
    "name": "Build pipeline",
    "sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
    "message": "test\n",
    "author_name": "User",
    "author_email": "user@gitlab.com",
    "author_url": "http://192.168.64.1:3005/user",
    "status": "created",
    "duration": null,
    "started_at": null,
    "finished_at": null,
    "started_at_iso": null,
    "finished_at_iso": null
  },
  "repository": {
    "name": "gitlab_test",
    "url": "http://192.168.64.1:3005/gitlab-org/gitlab-test",
    "description": "Atque in sunt eos similique dolores voluptatem.",
    "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": "Atque in sunt eos similique dolores voluptatem.",
    "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",
    "ci_config_path": null
  },
  "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
  }
}

재시도 횟수#

History

retries_count는 해당 job이 재시도인지 여부를 나타내는 정수입니다. 0은 job이 재시도되지 않았음을 의미합니다. 1은 첫 번째 재시도임을 의미합니다.

파이프라인 이름#

History

workflow:name을 사용하여 파이프라인에 사용자 지정 이름을 설정할 수 있습니다. 파이프라인에 이름이 있는 경우, 해당 이름이 commit.name의 값이 됩니다.

배포 이벤트#

배포 이벤트는 배포가 다음 상태일 때 트리거됩니다:

  • 시작됨

  • 성공함

  • 실패함

  • 취소됨

페이로드의 deployable_iddeployable_url은 배포를 실행한 CI/CD job을 나타냅니다. 배포 이벤트가 API 또는 trigger job에 의해 발생한 경우, deployable_urlnull입니다.

요청 헤더:

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": "Add new file"
}

그룹 멤버 이벤트#

  • Tier: Premium, Ultimate
    

History

이 이벤트는 그룹 웹훅에서만 트리거됩니다.

멤버 이벤트는 다음 경우에 트리거됩니다:

  • 사용자가 그룹 멤버로 추가됨.

  • 사용자의 액세스 레벨이 변경됨.

  • 사용자 액세스의 만료 날짜가 업데이트됨.

  • 사용자가 그룹에서 제거됨.

  • 사용자가 그룹에 액세스를 요청함.

  • 액세스 요청이 거부됨.

그룹에 멤버 추가#

요청 헤더:

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"
}

사용자가 액세스를 요청하는 경우#

History

요청 헤더:

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"
}

액세스 요청이 거부되는 경우#

히스토리

요청 헤더:

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"
}

프로젝트 이벤트#

  • Tier: Premium, Ultimate
    

히스토리

이 이벤트는 그룹 웹훅에서만 트리거됩니다.

프로젝트 이벤트는 다음과 같은 경우에 트리거됩니다:

그룹에서 프로젝트 생성#

요청 헤더:

X-Gitlab-Event: Project Hook

페이로드 예시:

{
  "event_name": "project_create",
  "created_at": "2024-10-07T10:43:48Z",
  "updated_at": "2024-10-07T10:43:48Z",
  "name": "project1",
  "path": "project1",
  "path_with_namespace": "group1/project1",
  "project_id": 22,
  "project_namespace_id": 32,
  "owners": [{
    "name": "John",
    "email": "user1@example.com"
  }],
  "project_visibility": "private"
}

그룹에서 프로젝트 삭제#

요청 헤더:

X-Gitlab-Event: Project Hook

페이로드 예시:

{
  "event_name": "project_destroy",
  "created_at": "2024-10-07T10:43:48Z",
  "updated_at": "2024-10-07T10:43:48Z",
  "name": "project1",
  "path": "project1",
  "path_with_namespace": "group1/project1",
  "project_id": 22,
  "project_namespace_id": 32,
  "owners": [{
    "name": "John",
    "email": "user1@example.com"
  }],
  "project_visibility": "private"
}

하위 그룹 이벤트#

  • Tier: Premium, Ultimate
    

이 이벤트는 그룹 웹훅에서만 트리거됩니다.

하위 그룹 이벤트는 다음과 같은 경우에 트리거됩니다:

그룹에 하위 그룹 생성#

요청 헤더:

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": "Administrator",
    "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
  }
}

릴리즈 이벤트#

History

  • GitLab 16.5에서 릴리즈 삭제 이벤트가 도입됨.

릴리즈 이벤트는 릴리즈가 생성, 업데이트, 또는 삭제될 때 트리거됩니다.

페이로드에서 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 has been released",
  "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,
        "link_type": "other",
        "name": "Changelog",
        "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": "Release v1.1",
    "title": "Release v1.1",
    "timestamp": "2020-10-31T14:58:32+11:00",
    "url": "https://example.com/gitlab-org/release-webhook-example/-/commit/ee0a3fb31ac16e11b9dbb596ad16d4af654d08f8",
    "author": {
      "name": "Example User",
      "email": "user@example.com"
    }
  }
}

마일스톤 이벤트#

History

마일스톤 이벤트는 마일스톤이 생성, 종료, 재개, 또는 삭제될 때 트리거됩니다.

페이로드에서 object_attributes.action에 사용 가능한 값은 다음과 같습니다:

  • create

  • close

  • reopen

요청 헤더:

X-Gitlab-Event: Milestone Hook

페이로드 예시:

{
  "object_kind": "milestone",
  "event_type": "milestone",
  "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": 61,
    "iid": 10,
    "title": "v1.0",
    "description": "First stable release",
    "state": "active",
    "created_at": "2025-06-16 14:10:57 UTC",
    "updated_at": "2025-06-16 14:10:57 UTC",
    "due_date": "2025-06-30",
    "start_date": "2025-06-16",
    "group_id": null,
    "project_id": 1
  },
  "action": "create"
}

Emoji 이벤트#

History

Emoji 이벤트는 다음 항목에 이모지 반응이 추가되거나 제거될 때 트리거됩니다:

  • 이슈

  • 머지 리퀘스트

  • 프로젝트 스니펫

  • Wiki 페이지

  • 다음 항목의 댓글:

이슈

  • 머지 리퀘스트

  • 프로젝트 스니펫

  • Wiki 페이지

  • 커밋

페이로드에서 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": "Issue 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": "New issue!",
    "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": "opened",
    "severity": "unknown"
  }
}

프로젝트 및 그룹 액세스 토큰 이벤트#

History

액세스 토큰 만료 이벤트는 액세스 토큰이 만료되기 전에 트리거됩니다. 이 이벤트는 다음 시점에 트리거됩니다:

  • 토큰 만료 7일 전

  • 토큰 만료 30일 전 (설정 필요)

  • 토큰 만료 60일 전 (설정 필요)

30일 및 60일 알림 설정에 대한 자세한 내용은 다음을 참고하세요:

페이로드에서 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",
    "last_used_at": "2024-01-20 10:15:30 UTC"
  },
  "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",
    "last_used_at": "2024-01-20 10:15:30 UTC"
  },
  "event_name": "expiring_access_token"
}

프로젝트 및 그룹 배포 토큰 이벤트#

History

  • GitLab 18.4에서 project_deploy_token_expiring_notifications라는 플래그와 함께 도입됨. 기본적으로 비활성화됨.

배포 토큰 만료 이벤트는 배포 토큰이 만료되기 전에 트리거됩니다. 이 이벤트는 다음 시점에 트리거됩니다:

  • 토큰 만료 7일 전.

  • 토큰 만료 30일 전.

  • 토큰 만료 60일 전.

페이로드에서 event_name에 사용 가능한 값은 다음과 같습니다:

  • expiring_deploy_token

요청 헤더:

X-Gitlab-Event: Resource Deploy Token Hook

프로젝트에 대한 페이로드 예시:

{
  "object_kind": "deploy_token",
  "project": {
    "id": 2,
    "name": "Gitlab Test",
    "description": "Voluptates sit architecto quos distinctio.",
    "web_url": "https://gitlab.example.com/gitlab-org/gitlab-test",
    "avatar_url": null,
    "git_ssh_url": "ssh://git@gitlab.example.com:2222/gitlab-org/gitlab-test.git",
    "git_http_url": "https://gitlab.example.com/gitlab-org/gitlab-test.git",
    "namespace": "Gitlab Org",
    "visibility_level": 10,
    "path_with_namespace": "gitlab-org/gitlab-test",
    "default_branch": "master",
    "ci_config_path": null,
    "homepage": "https://gitlab.example.com/gitlab-org/gitlab-test",
    "url": "ssh://git@gitlab.example.com:2222/gitlab-org/gitlab-test.git",
    "ssh_url": "ssh://git@gitlab.example.com:2222/gitlab-org/gitlab-test.git",
    "http_url": "https://gitlab.example.com/gitlab-org/gitlab-test.git"
  },
  "object_attributes": {
    "id": 79,
    "name": "seven-days-6days",
    "expires_at": "2025-08-03 07:57:25 UTC",
    "created_at": "2025-07-28 07:57:25 UTC",
    "revoked": false,
    "deploy_token_type": "project_type"
  },
  "event_name": "expiring_deploy_token"
}

취약점 이벤트#

History

  • GitLab 17.7에서 vulnerabilities_as_webhook_events라는 플래그와 함께 도입됨. 기본적으로 비활성화됨.

  • 취약점이 생성되거나 이슈가 취약점에 연결될 때 이벤트를 생성하는 기능이 GitLab 17.8에서 도입됨.

  • GitLab 17.11에서 일반적으로 사용 가능해짐. 기능 플래그 vulnerabilities_as_webhook_events 제거됨.

취약점 이벤트는 다음과 같은 경우에 트리거됩니다:

  • 취약점이 생성된 경우.

  • 취약점의 상태가 변경된 경우.

  • 이슈가 취약점에 연결된 경우.

요청 헤더:

X-Gitlab-Event: Vulnerability Hook

페이로드 예시:

{
  "object_kind": "vulnerability",
  "object_attributes": {
    "url": "https://example.com/flightjs/Flight/-/security/vulnerabilities/1",
    "title": "REXML DoS vulnerability",
    "state": "confirmed",
    "project_id": 50,
    "location": {
      "file": "Gemfile.lock",
      "dependency": {
        "package": {
          "name": "rexml"
        },
        "version": "3.3.1"
      }
    },
    "cvss": [
      {
        "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
        "vendor": "NVD"
      }
    ],
    "severity": "high",
    "severity_overridden": false,
    "identifiers": [
      {
        "name": "Gemnasium-29dce398-220a-4315-8c84-16cd8b6d9b05",
        "external_id": "29dce398-220a-4315-8c84-16cd8b6d9b05",
        "external_type": "gemnasium",
        "url": "https://gitlab.com/gitlab-org/security-products/gemnasium-db/-/blob/master/gem/rexml/CVE-2024-41123.yml"
      },
      {
        "name": "CVE-2024-41123",
        "external_id": "CVE-2024-41123",
        "external_type": "cve",
        "url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-41123"
      }
    ],
    "issues": [
      {
        "title": "REXML ReDoS vulnerability",
        "url": "https://example.com/flightjs/Flight/-/issues/1",
        "created_at": "2025-01-08T00:46:14.429Z",
        "updated_at": "2025-01-08T00:46:14.429Z"
      }
    ],
    "report_type": "dependency_scanning",
    "scanner_external_id": "gitlab-sbom-vulnerability-scanner",
    "confidence": "unknown",
    "confidence_overridden": false,
    "confirmed_at": "2025-01-08T00:46:14.413Z",
    "confirmed_by_id": 1,
    "dismissed_at": null,
    "dismissed_by_id": null,
    "resolved_at": null,
    "resolved_by_id": null,
    "auto_resolved": false,
    "resolved_on_default_branch": false,
    "created_at": "2025-01-08T00:46:14.413Z",
    "updated_at": "2025-01-08T00:46:14.413Z"
  }
}

Webhook 이벤트

GitLab v19.1
원문 보기
요약

- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated 웹훅을 사용하여 GitLab을 외부 애플리케이션에 연결하고 워크플로를 자동화하세요. 이 페이지에서는 프로젝트 웹훅 및 그룹 웹훅에 대해 트리거되는 이벤트 목록을 안내합니다.


Webhook 이벤트#

  - 
  Tier: Free, Premium, Ultimate

- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

웹훅을 사용하여 GitLab을 외부 애플리케이션에 연결하고 워크플로를 자동화하세요. GitLab에서 특정 이벤트가 발생하면, 웹훅이 설정된 엔드포인트로 상세 정보를 담은 HTTP POST 요청을 전송합니다. 코드 변경, 배포, 댓글, 기타 활동에 반응하는 자동화 프로세스를 구축하여 수동 개입 없이 작업을 처리할 수 있습니다.

이 페이지에서는 프로젝트 웹훅그룹 웹훅에 대해 트리거되는 이벤트 목록을 안내합니다.

시스템 웹훅에 대해 트리거되는 이벤트 목록은 시스템 웹훅을 참고하세요.

프로젝트 및 그룹 웹훅 모두에서 트리거되는 이벤트#

이벤트 유형 트리거 조건
댓글 이벤트 커밋, 머지 리퀘스트, 이슈, 코드 스니펫에 새 댓글이 작성되거나 편집될 때. 1
배포 이벤트 배포가 시작, 성공, 실패, 또는 취소될 때.
이모지 이벤트 이모지 반응이 추가되거나 제거될 때.
피처 플래그 이벤트 피처 플래그가 켜지거나 꺼질 때.
Job 이벤트 job 상태가 변경될 때.
머지 리퀘스트 이벤트 머지 리퀘스트가 생성, 편집, 머지, 또는 닫히거나, 소스 브랜치에 커밋이 추가될 때.
마일스톤 이벤트 마일스톤이 생성, 닫힘, 다시 열림, 또는 삭제될 때.
파이프라인 이벤트 파이프라인 상태가 변경될 때.
프로젝트 또는 그룹 액세스 토큰 이벤트 프로젝트 또는 그룹 액세스 토큰이 7일, 30일, 또는 60일 후 만료될 예정일 때.
푸시 이벤트 리포지터리에 푸시가 발생할 때.
릴리즈 이벤트 릴리즈가 생성, 편집, 또는 삭제될 때.
태그 이벤트 리포지터리에서 태그가 생성되거나 삭제될 때.
취약점 이벤트 취약점이 생성되거나 업데이트될 때.
위키 페이지 이벤트 위키 페이지가 생성, 편집, 또는 삭제될 때.
작업 항목 이벤트 새 작업 항목이 생성되거나, 기존 항목이 편집, 닫힘, 또는 다시 열릴 때.

각주:

  • GitLab 16.11에서 댓글 편집 시 댓글 이벤트가 트리거되도록 도입됨.

그룹 웹훅에서만 트리거되는 이벤트#

이벤트 유형 트리거 조건
그룹 멤버 이벤트 사용자가 그룹에 추가되거나 제거될 때, 또는 사용자의 액세스 레벨이나 액세스 만료일이 변경될 때.
프로젝트 이벤트 그룹 내에서 프로젝트가 생성되거나 삭제될 때.
하위 그룹 이벤트 하위 그룹이 그룹에 생성되거나 제거될 때.
작성자가 [GitLab 프로필](https://gitlab.com/-/user_settings/profile)에 공개 이메일을 등록하지 않은 경우,

웹훅 페이로드의 email 속성 값은 [REDACTED]로 표시됩니다.

푸시 이벤트#

다음의 경우를 제외하고, 리포지터리에 푸시할 때 푸시 이벤트가 트리거됩니다:

  • 태그를 푸시하는 경우.

  • 단일 푸시에 기본적으로 3개를 초과하는 브랜치의 변경 사항이 포함된 경우 (push_event_hooks_limit 설정 에 따라 다름).

한 번에 20개 이상의 커밋을 푸시하면, 페이로드의 commits 속성에는 최신 커밋 20개의 정보만 포함됩니다. 상세 커밋 데이터를 로드하는 것은 비용이 많이 들기 때문에, 이 제한은 성능상의 이유로 존재합니다. total_commits_count 속성에는 실제 커밋 수가 포함됩니다.

별도의 설정인 `push_event_activities_limit`은 GitLab이 활동 피드에

개별 푸시 이벤트를 생성할지, 아니면 일괄 푸시 이벤트를 생성할지를 제어합니다. 자세한 내용은 푸시 이벤트 활동 제한을 참고하세요.

새 커밋 없이 브랜치를 생성하고 푸시하면, 페이로드의 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",
  "message": "Hello World",
  "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",
    "ci_config_path": null,
    "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"
  },
  "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_options": {},
  "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
  }
}

태그 이벤트#

태그 이벤트는 리포지터리에서 태그를 생성하거나 삭제할 때 트리거됩니다.

기본적으로 단일 푸시에 세 개를 초과하는 태그에 대한 변경 사항이 포함된 경우에는 이 훅이 실행되지 않습니다. 이 제한은 push_event_hooks_limit 설정(기본값: 3)으로 제어되며, 태그와 브랜치 모두에 적용됩니다. 제한을 초과하면 해당 푸시 이벤트에 대한 웹훅이 전혀 트리거되지 않습니다.

GitLab Self-Managed 인스턴스의 경우, 관리자는 애플리케이션 Settings API를 사용하여 이 제한을 수정할 수 있습니다.

요청 헤더:

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",
  "message": "Tag message",
  "user_id": 1,
  "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": 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",
    "ci_config_path": null,
    "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"
  },
  "commits": [],
  "total_commits_count": 0,
  "push_options": {},
  "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
  }
}

작업 항목 이벤트#

History

작업 항목 이벤트는 작업 항목이 생성, 편집, 닫힘 또는 다시 열림 상태가 될 때 트리거됩니다. 지원되는 작업 항목 유형은 다음과 같습니다:

이슈 및 Service Desk 이슈의 경우 object_kindissue이고 typeIssue입니다. 그 외 모든 작업 항목의 경우 object_kind 필드는 work_item이고 type은 해당 작업 항목 유형입니다.

작업 항목 유형이 Epic인 경우, 변경 사항에 대한 이벤트를 수신하려면 웹훅을 그룹에 등록해야 합니다.

페이로드에서 object_attributes.action에 사용 가능한 값은 다음과 같습니다:

  • open

  • close

  • reopen

  • update

assigneeassignee_id 키는 더 이상 사용되지 않으며(deprecated) 첫 번째 담당자만 포함합니다.

escalation_statusescalation_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&d=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,
    "start_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&d=identicon"
  }],
  "assignee": {
    "name": "User1",
    "username": "user1",
    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40&d=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
      }]
    }
  }
}

댓글 이벤트#

History

댓글 이벤트는 커밋, 머지 리퀘스트, 이슈, 코드 스니펫에 새 댓글이 작성되거나 편집될 때 트리거됩니다.

노트 데이터는 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&d=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,
    "internal": false,
    "note": "This is a commit comment. How does this work?",
    "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 <user@example.com.com>\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": "Administrator",
    "username": "root",
    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40&d=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://localhost/gitlab-org/gitlab-test.git",
    "description": "Aut reprehenderit ut est.",
    "homepage": "http://example.com/gitlab-org/gitlab-test"
  },
  "object_attributes": {
    "id": 1244,
    "internal": false,
    "note": "This MR needs work.",
    "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 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"
    },
    "target": {
      "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"
    },
    "last_commit": {
      "id": "562e173be03b8ff2efb05345d12df18815438a4b",
      "message": "Merge branch 'another-branch' into 'master'\n\nCheck in this test\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": "User1",
      "username": "user1",
      "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40&d=identicon"
    },
    "detailed_merge_status": "checking"
  }
}

이슈에 댓글 작성#

  • assignee_id 필드는 더 이상 사용되지 않으며 첫 번째 담당자만 표시됩니다.

  • 기밀 이슈의 경우 event_typeconfidential_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&d=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,
    "internal": false,
    "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&d=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,
    "internal": false,
    "note": "Is this snippet doing what it's supposed to be doing?",
    "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"
  }
}

머지 리퀘스트 이벤트#

머지 리퀘스트 이벤트는 다음과 같은 경우에 트리거됩니다:

  • 새 머지 리퀘스트가 생성됨.

  • 기존 머지 리퀘스트가 업데이트, 승인(모든 필수 승인자에 의해), 미승인, 병합, 또는 종료됨.

  • 개별 사용자가 기존 머지 리퀘스트에 승인을 추가하거나 취소함.

  • 리뷰어가 머지 리퀘스트 리뷰를 재요청받음.

  • 소스 브랜치에 커밋이 추가됨.

  • 머지 리퀘스트의 모든 스레드가 해결됨.

머지 리퀘스트 이벤트는 changes 필드가 비어 있는 경우에도 트리거될 수 있습니다. 웹훅 수신자는 항상 changes 필드의 내용을 검사하여 머지 리퀘스트의 실제 변경 사항을 확인해야 합니다.

페이로드 구조#

웹훅 페이로드의 JSON 구조는 모든 액션 유형에서 일관됩니다. 차이점은 어느 필드에 데이터가 포함되는지, 그리고 oldrev, system, system_action과 같은 조건부 필드가 존재하는지 여부입니다.

페이로드에서 object_attributes.action에 사용 가능한 값은 다음과 같습니다:

  • open: 머지 리퀘스트가 생성됨.

  • close: 머지 리퀘스트가 종료됨.

  • reopen: 종료된 머지 리퀘스트가 재개됨.

  • update: 머지 리퀘스트가 업데이트됨. 일반적인 업데이트와 리뷰 재요청 액션이 포함됩니다. 구체적인 업데이트 유형을 확인하려면 changes 필드를 참조하세요.

  • approval: 사용자가 승인을 추가함.

  • approved: 모든 필수 승인자에 의해 머지 리퀘스트가 완전히 승인됨.

  • unapproval: 사용자가 수동으로 또는 시스템에 의해 승인을 취소함.

  • unapproved: 이전에 승인된 머지 리퀘스트가 수동 또는 시스템에 의해 승인 상태를 잃습니다.

  • merge: 머지 리퀘스트가 머지됩니다.

머지 리퀘스트 웹훅 페이로드에는 다음과 같은 최상위 필드가 포함됩니다:

Field Type Description
object_kind String "merge_request"
event_type String "merge_request"
user Object 이벤트를 트리거한 사용자.
project Object 타깃 프로젝트.
object_attributes Object 머지 리퀘스트 데이터.
changes Object 작업 중에 변경된 속성을 포함합니다.
assignees Array 현재 할당된 사용자.
reviewers Array 현재 할당된 리뷰어.
labels Array 라벨 객체.
repository Object 더 이상 사용되지 않습니다. 대신 project를 사용하세요. 리포지터리 정보.

더 이상 사용되지 않는 필드#

다음 필드는 더 이상 사용되지 않으며 하위 호환성을 위해서만 포함됩니다. 대신 권장 대안을 사용하세요:

Deprecated field Recommended alternative
object_attributes.assignee_id object_attributes.assignee_ids
object_attributes.work_in_progress object_attributes.draft
project.http_url project.git_http_url
project.homepage project.web_url
project.ssh_url project.git_ssh_url
project.url project.git_ssh_url or project.git_http_url
repository project

object_attributes 필드#

History

object_attributes 필드에는 머지 리퀘스트의 현재 상태가 포함됩니다. 다음 필드가 포함됩니다:

Field Type Description
action String 웹훅을 트리거한 작업. 예: open, update, merge.
actioned_at String 웹훅을 트리거한 작업이 발생한 시각.
approval_rules Array 승인 규칙 객체 배열 (EE 전용).
assignee_ids Array 담당자 ID 배열.
author_id Integer 머지 리퀘스트 작성자의 ID.
blocking_discussions_resolved Boolean 차단 중인 토론이 해결되었는지 여부.
created_at String 머지 리퀘스트가 생성된 시각.
description String 머지 리퀘스트 설명.
detailed_merge_status String 상세 머지 상태 정보. 가능한 값 목록은 머지 상태를 참조하세요.
draft Boolean 머지 리퀘스트가 드래프트인지 여부.
first_contribution Boolean 작성자의 첫 번째 기여인지 여부.
head_pipeline_id Integer 헤드 파이프라인의 ID.
human_time_change String 사람이 읽을 수 있는 형식의 시간 변경 값.
human_time_estimate String 사람이 읽을 수 있는 형식의 예상 시간.
human_total_time_spent String 사람이 읽을 수 있는 형식의 총 소요 시간.
id Integer 머지 리퀘스트 ID.
iid Integer 머지 리퀘스트의 내부 ID.
labels Array 라벨 객체 배열.
last_commit Object 세부 정보가 포함된 마지막 커밋 객체.
last_edited_at String 머지 리퀘스트가 마지막으로 편집된 시각.
last_edited_by_id Integer 마지막으로 편집한 사용자의 ID.
merge_commit_sha String 머지 커밋의 SHA.
merged_at String 머지 리퀘스트가 머지된 시각. 아직 머지되지 않은 경우 null.
merge_error String 머지 오류 메시지.
merge_params Object 머지 파라미터.
merge_status String 머지 리퀘스트의 상태.
merge_user_id Integer 머지한 사용자의 ID.
merge_when_pipeline_succeeds Boolean 자동 머지가 활성화되었는지 여부.
milestone_id Integer 마일스톤의 ID.
oldrev String 이전 커밋 SHA (푸시 관련 이벤트에서만 존재).
prepared_at String 머지 리퀘스트가 준비된 타임스탬프. 모든 준비 단계가 완료된 후 한 번만 채워지며, 추가 변경이 있어도 업데이트되지 않습니다.
reviewer_ids Array 리뷰어 ID 배열.
source_branch String 소스 브랜치 이름.
source Object 소스 프로젝트 세부 정보. 예: 이름 및 설명.
source_project_id Integer 소스 프로젝트의 ID.
squash_commit_sha String 스쿼시 커밋의 SHA. 머지 리퀘스트가 스쿼시로 머지될 때만 존재합니다.
state_id Integer 상태 ID (1: opened, 2: closed, 3: merged, 4: locked).
state String 머지 리퀘스트의 상태 (opened, closed, merged, locked).
system_action String 시스템 작업 (system이 true인 경우에만 존재).
system Boolean 이벤트가 시스템에 의해 시작되었는지 여부.
target_branch String 타깃 브랜치 이름.
target Object 타깃 프로젝트 세부 정보. 예: 이름 및 설명.
target_project_id Integer 타깃 프로젝트의 ID.
time_change Integer 초 단위 소요 시간 변경 값.
time_estimate Integer 초 단위 예상 시간.
title String 머지 리퀘스트 제목.
total_time_spent Integer 초 단위 총 소요 시간.
updated_at String 머지 리퀘스트가 마지막으로 업데이트된 시각.
updated_by_id Integer 마지막으로 업데이트한 사용자의 ID.
url String 머지 리퀘스트의 URL.

changes 필드#

changes 필드에는 작업 중에 수정된 필드만 포함됩니다. object_attributes의 모든 필드가 changes에 나타나지는 않습니다.

변경된 각 필드는 다음 형식을 따릅니다:

{
  "field_name": {
    "previous": "old_value",
    "current": "new_value"
  }
}

Attributes#

  • assignees

  • blocking_discussions_resolved

  • description

  • draft

  • head_pipeline_id

  • labels

  • last_edited_at

  • last_edited_by_id

  • merge_commit_sha

  • merge_error

  • merge_params

  • merge_status

  • merge_user_id

  • merge_when_pipeline_succeeds

  • milestone_id

  • prepared_at

  • reviewer_ids

  • reviewers

  • squash_commit_sha

  • state_id

  • target_branch

  • time_change

  • time_estimate

  • title

  • total_time_spent

  • updated_at

  • updated_by_id

머지 리퀘스트 액션별 필드#

object_attributes.oldrev 필드는 다음과 같이 실제 코드 변경이 있을 때 update 액션에서만 사용 가능합니다:

  • 소스 브랜치에 새 코드가 푸시된 경우.

  • 제안 사항이 적용된 경우.

다음 예시는 oldrev가 포함된 update 이벤트(부분 페이로드)를 나타냅니다:

{
  "object_kind": "merge_request",
  "event_type": "merge_request",
  "object_attributes": {
    "action": "update",
    "oldrev": "e59094b8de0f2f91abbe4760a52d9137260252d8"
  }
}

시스템에 의해 시작된 머지 리퀘스트 이벤트#

일부 머지 리퀘스트 이벤트는 새 커밋 푸시로 인해 승인이 초기화되는 경우처럼 시스템에 의해 자동으로 트리거됩니다. 이러한 시스템 시작 웹훅 이벤트는 푸시 이벤트에 의해서만 트리거되며, 페이로드에 다음과 같은 추가 필드가 포함됩니다:

object_attributes.system: 불리언 필드입니다. true이면 시스템에 의해 이벤트가 트리거된 것이고, false이면 사용자 액션에 의해 이벤트가 트리거된 것입니다.

object_attributes.system_action: systemtrue일 때만 존재하는 문자열 필드입니다. 시스템 액션에 대한 추가 컨텍스트를 제공합니다. 사용 가능한 값은 다음과 같습니다:

approvals_reset_on_push: 프로젝트에서 푸시 시 승인 초기화가 활성화되어 있으며, 새 커밋이 푸시된 경우입니다.

  • code_owner_approvals_reset_on_push: 프로젝트에서 선택적 코드 소유자 제거가 활성화되어 있으며, CODEOWNERS 규칙과 일치하는 파일 변경으로 인해 Code Owner 승인이 초기화된 경우입니다.

다른 승인 초기화 시나리오는 웹훅을 트리거하지 않습니다.

다음 예시는 시스템 시작 이벤트(부분 페이로드)를 나타냅니다:

{
  "object_kind": "merge_request",
  "event_type": "merge_request",
  "object_attributes": {
    "action": "update",
    "system": true,
    "system_action": "approvals_reset_on_push"
  }
}

리뷰어 상태 추적#

머지 리퀘스트 웹훅 페이로드의 reviewers 배열에는 각 리뷰어에 대한 state 필드가 포함됩니다. state 필드는 리뷰어의 현재 리뷰 상태를 나타냅니다:

  • unreviewed: 리뷰어가 아직 머지 리퀘스트를 검토하지 않은 상태입니다.

  • review_started: 리뷰어가 리뷰를 시작했지만 완료하지 않은 상태입니다.

  • reviewed: 리뷰어가 리뷰를 완료함

  • requested_changes: 리뷰어가 변경 사항을 요청함

  • approved: 리뷰어가 머지 리퀘스트를 승인함

  • unapproved: 리뷰어가 이전에 승인했으나 승인이 취소됨

다음 예시는 reviewers 배열을 보여줍니다(부분 페이로드):

{
  "reviewers": [
    {
      "id": 6,
      "name": "User1",
      "username": "user1",
      "state": "unreviewed",
      "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
      "email": "user1@example.com"
    }
  ]
}

리뷰 재요청 이벤트#

머지 리퀘스트에서 리뷰어에게 리뷰가 재요청되면, changes 객체에 향상된 정보를 포함한 action: "update" 웹훅이 트리거됩니다. changes 페이로드에는 다음이 포함됩니다:

  • 이전 상태 (첫 번째 배열): 재요청 전 리뷰어의 상태를 나타내며, re_requested: false가 설정됨

  • 현재 상태 (두 번째 배열): 재요청 후 리뷰어의 업데이트된 상태를 나타내며, 재요청된 리뷰어에 대해 re_requested: true가 설정됨

  • 상태 전환: 리뷰어의 상태가 어떻게 변경되었는지를 보여줌(예: approved에서 unreviewed로)

다음 예시는 리뷰 재요청 변경 내용을 보여줍니다(부분 페이로드):

{
  "object_kind": "merge_request",
  "event_type": "merge_request",
  "object_attributes": {
    "action": "update"
  },
  "changes": {
    "reviewers": [
      [
        {
          "id": 6,
          "name": "User1",
          "username": "user1",
          "state": "approved",
          "re_requested": false,
          "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
          "email": "user1@example.com"
        }
      ],
      [
        {
          "id": 6,
          "name": "User1",
          "username": "user1",
          "state": "unreviewed",
          "re_requested": true,
          "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
          "email": "user1@example.com"
        }
      ]
    ]
  }
}

전체 페이로드 예시#

요청 헤더:

X-Gitlab-Event: Merge Request Hook

다음 예시는 open 액션에 대한 전체 머지 리퀘스트 웹훅 페이로드입니다. 명확성을 위해 더 이상 사용되지 않는 필드는 생략되었습니다. 더 이상 사용되지 않는 필드 목록과 권장 대안은 더 이상 사용되지 않는 필드를 참조하세요.

{
  "object_kind": "merge_request",
  "event_type": "merge_request",
  "user": {
    "id": 1,
    "name": "Alex Garcia",
    "username": "agarcia",
    "avatar_url": "https://www.gravatar.com/avatar/1a29da0ccd099482194440fac762f5ccb4ec53227761d1859979367644a889a5?s=80&d=identicon",
    "email": "agarcia@example.com"
  },
  "project": {
    "id": 2,
    "name": "Flight Management",
    "description": "Flight management application for tracking aircraft status.",
    "web_url": "http://gitlab.example.com/flightjs/flight-management",
    "avatar_url": null,
    "git_ssh_url": "ssh://git@gitlab.example.com:flightjs/flight-management.git",
    "git_http_url": "http://gitlab.example.com/flightjs/flight-management.git",
    "namespace": "Flightjs",
    "visibility_level": 0,
    "path_with_namespace": "flightjs/flight-management",
    "default_branch": "main",
    "ci_config_path": null
  },
  "object_attributes": {
    "author_id": 1,
    "created_at": "2026-01-16 05:56:22 UTC",
    "description": "This merge request adds input validation to the booking form.",
    "draft": false,
    "head_pipeline_id": null,
    "id": 93,
    "iid": 16,
    "last_edited_at": null,
    "last_edited_by_id": null,
    "merge_commit_sha": null,
    "merged_at": null,
    "merge_error": null,
    "merge_params": {
      "force_remove_source_branch": "1"
    },
    "merge_status": "checking",
    "merge_user_id": null,
    "merge_when_pipeline_succeeds": false,
    "milestone_id": 8,
    "source_branch": "feature/booking-validation",
    "source_project_id": 2,
    "squash_commit_sha": null,
    "state_id": 1,
    "target_branch": "main",
    "target_project_id": 2,
    "time_estimate": 0,
    "title": "Add input validation to booking form",
    "updated_at": "2026-01-16 05:56:25 UTC",
    "updated_by_id": null,
    "prepared_at": "2026-01-16 05:56:25 UTC",
    "assignee_ids": [
      1
    ],
    "blocking_discussions_resolved": true,
    "detailed_merge_status": "checking",
    "first_contribution": true,
    "human_time_change": null,
    "human_time_estimate": null,
    "human_total_time_spent": null,
    "labels": [
      {
        "id": 19,
        "title": "enhancement",
        "color": "#adb21a",
        "project_id": null,
        "created_at": "2026-01-07 00:03:52 UTC",
        "updated_at": "2026-01-07 00:03:52 UTC",
        "template": false,
        "description": null,
        "type": "GroupLabel",
        "group_id": 24
      }
    ],
    "last_commit": {
      "id": "e59094b8de0f2f91abbe4760a52d9137260252d8",
      "message": "Add email format validation",
      "title": "Add email format validation",
      "timestamp": "2026-01-16T05:01:10+00:00",
      "url": "http://gitlab.example.com/flightjs/flight-management/-/commit/e59094b8de0f2f91abbe4760a52d9137260252d8",
      "author": {
        "name": "Alex Garcia",
        "email": "agarcia@example.com"
      }
    },
    "reviewer_ids": [
      25
    ],
    "source": {
      "id": 2,
      "name": "Flight Management",
      "description": "Flight management application for tracking aircraft status.",
      "web_url": "http://gitlab.example.com/flightjs/flight-management",
      "avatar_url": null,
      "git_ssh_url": "ssh://git@gitlab.example.com:flightjs/flight-management.git",
      "git_http_url": "http://gitlab.example.com/flightjs/flight-management.git",
      "namespace": "Flightjs",
      "visibility_level": 0,
      "path_with_namespace": "flightjs/flight-management",
      "default_branch": "main",
      "ci_config_path": null
    },
    "state": "opened",
    "system": false,
    "target": {
      "id": 2,
      "name": "Flight Management",
      "description": "Flight management application for tracking aircraft status.",
      "web_url": "http://gitlab.example.com/flightjs/flight-management",
      "avatar_url": null,
      "git_ssh_url": "ssh://git@gitlab.example.com:flightjs/flight-management.git",
      "git_http_url": "http://gitlab.example.com/flightjs/flight-management.git",
      "namespace": "Flightjs",
      "visibility_level": 0,
      "path_with_namespace": "flightjs/flight-management",
      "default_branch": "main",
      "ci_config_path": null
    },
    "time_change": 0,
    "total_time_spent": 0,
    "url": "http://gitlab.example.com/flightjs/flight-management/-/merge_requests/16",
    "approval_rules": [
      {
        "id": 4,
        "approvals_required": 0,
        "name": "All Members",
        "rule_type": "any_approver",
        "report_type": null,
        "merge_request_id": 93,
        "section": null,
        "modified_from_project_rule": false,
        "orchestration_policy_idx": null,
        "vulnerabilities_allowed": 0,
        "scanners": [],
        "severity_levels": [],
        "vulnerability_states": [
          "new_needs_triage",
          "new_dismissed"
        ],
        "security_orchestration_policy_configuration_id": null,
        "scan_result_policy_id": null,
        "applicable_post_merge": null,
        "project_id": 2,
        "approval_policy_rule_id": null,
        "updated_at": "2026-01-16 05:56:22 UTC",
        "created_at": "2026-01-16 05:56:22 UTC"
      }
    ],
    "action": "open",
    "actioned_at": "2026-01-16 05:56:26 UTC"
  },
  "labels": [
    {
      "id": 19,
      "title": "enhancement",
      "color": "#adb21a",
      "project_id": null,
      "created_at": "2026-01-07 00:03:52 UTC",
      "updated_at": "2026-01-07 00:03:52 UTC",
      "template": false,
      "description": null,
      "type": "GroupLabel",
      "group_id": 24
    }
  ],
  "changes": {
    "merge_status": {
      "previous": "preparing",
      "current": "checking"
    },
    "updated_at": {
      "previous": "2026-01-16 05:56:22 UTC",
      "current": "2026-01-16 05:56:25 UTC"
    },
    "prepared_at": {
      "previous": null,
      "current": "2026-01-16 05:56:25 UTC"
    }
  },
  "assignees": [
    {
      "id": 1,
      "name": "Alex Garcia",
      "username": "agarcia",
      "avatar_url": "https://www.gravatar.com/avatar/1a29da0ccd099482194440fac762f5ccb4ec53227761d1859979367644a889a5?s=80&d=identicon",
      "email": "[REDACTED]"
    }
  ],
  "reviewers": [
    {
      "id": 25,
      "name": "Sidney Jones",
      "username": "sjones",
      "avatar_url": "https://www.gravatar.com/avatar/1be419860e7f852e20ca2691e6b55949f7809177e7765181da42e4448491e367?s=80&d=identicon",
      "email": "[REDACTED]",
      "state": "unreviewed",
      "re_requested": false
    }
  ]
}
`assignee_id`와 `merge_status` 필드는 [더 이상 사용되지 않습니다](/19.1/api/merge_requests/).

Wiki 페이지 이벤트#

Wiki 페이지 이벤트는 Wiki 페이지가 생성, 업데이트 또는 삭제될 때 트리거됩니다.

요청 헤더:

X-Gitlab-Event: Wiki Page Hook

페이로드 예시:

{
  "object_kind": "wiki_page",
  "user": {
    "id": 1,
    "name": "Administrator",
    "username": "root",
    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
    "email": "admin@example.com"
  },
  "project": {
    "id": 1,
    "name": "awesome-project",
    "description": "This is awesome",
    "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": "Awesome",
    "content": "awesome content goes here",
    "format": "markdown",
    "message": "adding an awesome page to the wiki",
    "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": "Pipeline for branch: master",
    "ref": "master",
    "tag": false,
    "sha": "bcbb5ec396a2c0f828686f14fac9b80b780504f2",
    "before_sha": "bcbb5ec396a2c0f828686f14fac9b80b780504f2",
    "source": "merge_request_event",
    "status": "success",
    "detailed_status": "passed",
    "stages": [
      "build",
      "test",
      "deploy"
    ],
    "created_at": "2016-08-12 15:23:28 UTC",
    "finished_at": "2016-08-12 15:26:29 UTC",
    "duration": 63,
    "queued_duration": 10,
    "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": "Test",
    "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": "Administrator",
    "username": "root",
    "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
    "email": "user_email@gitlab.com"
  },
  "project": {
    "id": 1,
    "name": "Gitlab Test",
    "description": "Atque in sunt eos similique dolores voluptatem.",
    "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",
    "ci_config_path": null
  },
  "commit": {
    "id": "bcbb5ec396a2c0f828686f14fac9b80b780504f2",
    "message": "test\n",
    "title": "test",
    "timestamp": "2016-08-12T17:23:21+02:00",
    "url": "http://example.com/gitlab-org/gitlab-test/commit/bcbb5ec396a2c0f828686f14fac9b80b780504f2",
    "author": {
      "name": "User",
      "email": "user@gitlab.com"
    }
  },
  "builds": [
    {
      "id": 380,
      "stage": "deploy",
      "name": "production",
      "status": "skipped",
      "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",
      "manual": true,
      "allow_failure": false,
      "user": {
        "id": 1,
        "name": "Administrator",
        "username": "root",
        "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
        "email": "admin@example.com"
      },
      "runner": null,
      "artifacts_file": {
        "filename": null,
        "size": null
      },
      "environment": {
        "name": "production",
        "action": "start",
        "deployment_tier": "production"
      }
    },
    {
      "id": 377,
      "stage": "test",
      "name": "test-image",
      "status": "success",
      "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": "on_success",
      "manual": false,
      "allow_failure": false,
      "user": {
        "id": 1,
        "name": "Administrator",
        "username": "root",
        "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
        "email": "admin@example.com"
      },
      "runner": {
        "id": 380987,
        "description": "shared-runners-manager-6.gitlab.com",
        "runner_type": "instance_type",
        "active": true,
        "is_shared": true,
        "tags": [
          "linux",
          "docker",
          "shared-runner"
        ]
      },
      "artifacts_file": {
        "filename": null,
        "size": null
      },
      "environment": null
    },
    {
      "id": 378,
      "stage": "test",
      "name": "test-build",
      "status": "failed",
      "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": "script_failure",
      "when": "on_success",
      "manual": false,
      "allow_failure": false,
      "user": {
        "id": 1,
        "name": "Administrator",
        "username": "root",
        "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
        "email": "admin@example.com"
      },
      "runner": {
        "id": 380987,
        "description": "shared-runners-manager-6.gitlab.com",
        "runner_type": "instance_type",
        "active": true,
        "is_shared": true,
        "tags": [
          "linux",
          "docker"
        ]
      },
      "artifacts_file": {
        "filename": null,
        "size": null
      },
      "environment": null
    },
    {
      "id": 376,
      "stage": "build",
      "name": "build-image",
      "status": "success",
      "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": "on_success",
      "manual": false,
      "allow_failure": false,
      "user": {
        "id": 1,
        "name": "Administrator",
        "username": "root",
        "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
        "email": "admin@example.com"
      },
      "runner": {
        "id": 380987,
        "description": "shared-runners-manager-6.gitlab.com",
        "runner_type": "instance_type",
        "active": true,
        "is_shared": true,
        "tags": [
          "linux",
          "docker"
        ]
      },
      "artifacts_file": {
        "filename": null,
        "size": null
      },
      "environment": null
    },
    {
      "id": 379,
      "stage": "deploy",
      "name": "staging",
      "status": "created",
      "created_at": "2016-08-12 15:23:28 UTC",
      "started_at": null,
      "finished_at": null,
      "duration": null,
      "queued_duration": null,
      "failure_reason": null,
      "when": "on_success",
      "manual": false,
      "allow_failure": false,
      "user": {
        "id": 1,
        "name": "Administrator",
        "username": "root",
        "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
        "email": "admin@example.com"
      },
      "runner": null,
      "artifacts_file": {
        "filename": null,
        "size": null
      },
      "environment": {
        "name": "staging",
        "action": "start",
        "deployment_tier": "staging"
      }
    }
  ],
  "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
  }
}

Job 이벤트#

Job 이벤트는 job의 상태가 변경될 때 트리거됩니다. 트리거 job은 제외됩니다.

페이로드의 commit.id는 커밋의 ID가 아닌 파이프라인의 ID입니다.

GitLab 15.1 이후부터, 차단된 사용자에 의해 트리거된 job 이벤트는 처리되지 않습니다.

요청 헤더:

X-Gitlab-Event: Job Hook

페이로드 예시:

{
  "object_kind": "build",
  "ref": "gitlab-script-trigger",
  "tag": false,
  "before_sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
  "sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
  "retries_count": 2,
  "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_created_at_iso": "2021-02-23T02:41:37Z",
  "build_started_at_iso": null,
  "build_finished_at_iso": null,
  "build_duration": null,
  "build_queued_duration": 1095.588715,
  "build_allow_failure": false,
  "build_failure_reason": "unknown_failure",
  "pipeline_id": 2366,
  "runner": {
    "id": 380987,
    "description": "shared-runners-manager-6.gitlab.com",
    "runner_type": "project_type",
    "active": true,
    "is_shared": false,
    "tags": [
      "linux",
      "docker"
    ]
  },
  "project_id": 380,
  "project_name": "gitlab-org/gitlab-test",
  "user": {
    "id": 3,
    "name": "User",
    "username": "user",
    "avatar_url": "http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon",
    "email": "user@gitlab.com"
  },
  "commit": {
    "id": 2366,
    "name": "Build pipeline",
    "sha": "2293ada6b400935a1378653304eaf6221e0fdb8f",
    "message": "test\n",
    "author_name": "User",
    "author_email": "user@gitlab.com",
    "author_url": "http://192.168.64.1:3005/user",
    "status": "created",
    "duration": null,
    "started_at": null,
    "finished_at": null,
    "started_at_iso": null,
    "finished_at_iso": null
  },
  "repository": {
    "name": "gitlab_test",
    "url": "http://192.168.64.1:3005/gitlab-org/gitlab-test",
    "description": "Atque in sunt eos similique dolores voluptatem.",
    "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": "Atque in sunt eos similique dolores voluptatem.",
    "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",
    "ci_config_path": null
  },
  "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
  }
}

재시도 횟수#

History

retries_count는 해당 job이 재시도인지 여부를 나타내는 정수입니다. 0은 job이 재시도되지 않았음을 의미합니다. 1은 첫 번째 재시도임을 의미합니다.

파이프라인 이름#

History

workflow:name을 사용하여 파이프라인에 사용자 지정 이름을 설정할 수 있습니다. 파이프라인에 이름이 있는 경우, 해당 이름이 commit.name의 값이 됩니다.

배포 이벤트#

배포 이벤트는 배포가 다음 상태일 때 트리거됩니다:

  • 시작됨

  • 성공함

  • 실패함

  • 취소됨

페이로드의 deployable_iddeployable_url은 배포를 실행한 CI/CD job을 나타냅니다. 배포 이벤트가 API 또는 trigger job에 의해 발생한 경우, deployable_urlnull입니다.

요청 헤더:

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": "Add new file"
}

그룹 멤버 이벤트#

  • Tier: Premium, Ultimate
    

History

이 이벤트는 그룹 웹훅에서만 트리거됩니다.

멤버 이벤트는 다음 경우에 트리거됩니다:

  • 사용자가 그룹 멤버로 추가됨.

  • 사용자의 액세스 레벨이 변경됨.

  • 사용자 액세스의 만료 날짜가 업데이트됨.

  • 사용자가 그룹에서 제거됨.

  • 사용자가 그룹에 액세스를 요청함.

  • 액세스 요청이 거부됨.

그룹에 멤버 추가#

요청 헤더:

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"
}

사용자가 액세스를 요청하는 경우#

History

요청 헤더:

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"
}

액세스 요청이 거부되는 경우#

히스토리

요청 헤더:

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"
}

프로젝트 이벤트#

  • Tier: Premium, Ultimate
    

히스토리

이 이벤트는 그룹 웹훅에서만 트리거됩니다.

프로젝트 이벤트는 다음과 같은 경우에 트리거됩니다:

그룹에서 프로젝트 생성#

요청 헤더:

X-Gitlab-Event: Project Hook

페이로드 예시:

{
  "event_name": "project_create",
  "created_at": "2024-10-07T10:43:48Z",
  "updated_at": "2024-10-07T10:43:48Z",
  "name": "project1",
  "path": "project1",
  "path_with_namespace": "group1/project1",
  "project_id": 22,
  "project_namespace_id": 32,
  "owners": [{
    "name": "John",
    "email": "user1@example.com"
  }],
  "project_visibility": "private"
}

그룹에서 프로젝트 삭제#

요청 헤더:

X-Gitlab-Event: Project Hook

페이로드 예시:

{
  "event_name": "project_destroy",
  "created_at": "2024-10-07T10:43:48Z",
  "updated_at": "2024-10-07T10:43:48Z",
  "name": "project1",
  "path": "project1",
  "path_with_namespace": "group1/project1",
  "project_id": 22,
  "project_namespace_id": 32,
  "owners": [{
    "name": "John",
    "email": "user1@example.com"
  }],
  "project_visibility": "private"
}

하위 그룹 이벤트#

  • Tier: Premium, Ultimate
    

이 이벤트는 그룹 웹훅에서만 트리거됩니다.

하위 그룹 이벤트는 다음과 같은 경우에 트리거됩니다:

그룹에 하위 그룹 생성#

요청 헤더:

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": "Administrator",
    "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
  }
}

릴리즈 이벤트#

History

  • GitLab 16.5에서 릴리즈 삭제 이벤트가 도입됨.

릴리즈 이벤트는 릴리즈가 생성, 업데이트, 또는 삭제될 때 트리거됩니다.

페이로드에서 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 has been released",
  "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,
        "link_type": "other",
        "name": "Changelog",
        "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": "Release v1.1",
    "title": "Release v1.1",
    "timestamp": "2020-10-31T14:58:32+11:00",
    "url": "https://example.com/gitlab-org/release-webhook-example/-/commit/ee0a3fb31ac16e11b9dbb596ad16d4af654d08f8",
    "author": {
      "name": "Example User",
      "email": "user@example.com"
    }
  }
}

마일스톤 이벤트#

History

마일스톤 이벤트는 마일스톤이 생성, 종료, 재개, 또는 삭제될 때 트리거됩니다.

페이로드에서 object_attributes.action에 사용 가능한 값은 다음과 같습니다:

  • create

  • close

  • reopen

요청 헤더:

X-Gitlab-Event: Milestone Hook

페이로드 예시:

{
  "object_kind": "milestone",
  "event_type": "milestone",
  "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": 61,
    "iid": 10,
    "title": "v1.0",
    "description": "First stable release",
    "state": "active",
    "created_at": "2025-06-16 14:10:57 UTC",
    "updated_at": "2025-06-16 14:10:57 UTC",
    "due_date": "2025-06-30",
    "start_date": "2025-06-16",
    "group_id": null,
    "project_id": 1
  },
  "action": "create"
}

Emoji 이벤트#

History

Emoji 이벤트는 다음 항목에 이모지 반응이 추가되거나 제거될 때 트리거됩니다:

  • 이슈

  • 머지 리퀘스트

  • 프로젝트 스니펫

  • Wiki 페이지

  • 다음 항목의 댓글:

이슈

  • 머지 리퀘스트

  • 프로젝트 스니펫

  • Wiki 페이지

  • 커밋

페이로드에서 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": "Issue 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": "New issue!",
    "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": "opened",
    "severity": "unknown"
  }
}

프로젝트 및 그룹 액세스 토큰 이벤트#

History

액세스 토큰 만료 이벤트는 액세스 토큰이 만료되기 전에 트리거됩니다. 이 이벤트는 다음 시점에 트리거됩니다:

  • 토큰 만료 7일 전

  • 토큰 만료 30일 전 (설정 필요)

  • 토큰 만료 60일 전 (설정 필요)

30일 및 60일 알림 설정에 대한 자세한 내용은 다음을 참고하세요:

페이로드에서 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",
    "last_used_at": "2024-01-20 10:15:30 UTC"
  },
  "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",
    "last_used_at": "2024-01-20 10:15:30 UTC"
  },
  "event_name": "expiring_access_token"
}

프로젝트 및 그룹 배포 토큰 이벤트#

History

  • GitLab 18.4에서 project_deploy_token_expiring_notifications라는 플래그와 함께 도입됨. 기본적으로 비활성화됨.

배포 토큰 만료 이벤트는 배포 토큰이 만료되기 전에 트리거됩니다. 이 이벤트는 다음 시점에 트리거됩니다:

  • 토큰 만료 7일 전.

  • 토큰 만료 30일 전.

  • 토큰 만료 60일 전.

페이로드에서 event_name에 사용 가능한 값은 다음과 같습니다:

  • expiring_deploy_token

요청 헤더:

X-Gitlab-Event: Resource Deploy Token Hook

프로젝트에 대한 페이로드 예시:

{
  "object_kind": "deploy_token",
  "project": {
    "id": 2,
    "name": "Gitlab Test",
    "description": "Voluptates sit architecto quos distinctio.",
    "web_url": "https://gitlab.example.com/gitlab-org/gitlab-test",
    "avatar_url": null,
    "git_ssh_url": "ssh://git@gitlab.example.com:2222/gitlab-org/gitlab-test.git",
    "git_http_url": "https://gitlab.example.com/gitlab-org/gitlab-test.git",
    "namespace": "Gitlab Org",
    "visibility_level": 10,
    "path_with_namespace": "gitlab-org/gitlab-test",
    "default_branch": "master",
    "ci_config_path": null,
    "homepage": "https://gitlab.example.com/gitlab-org/gitlab-test",
    "url": "ssh://git@gitlab.example.com:2222/gitlab-org/gitlab-test.git",
    "ssh_url": "ssh://git@gitlab.example.com:2222/gitlab-org/gitlab-test.git",
    "http_url": "https://gitlab.example.com/gitlab-org/gitlab-test.git"
  },
  "object_attributes": {
    "id": 79,
    "name": "seven-days-6days",
    "expires_at": "2025-08-03 07:57:25 UTC",
    "created_at": "2025-07-28 07:57:25 UTC",
    "revoked": false,
    "deploy_token_type": "project_type"
  },
  "event_name": "expiring_deploy_token"
}

취약점 이벤트#

History

  • GitLab 17.7에서 vulnerabilities_as_webhook_events라는 플래그와 함께 도입됨. 기본적으로 비활성화됨.

  • 취약점이 생성되거나 이슈가 취약점에 연결될 때 이벤트를 생성하는 기능이 GitLab 17.8에서 도입됨.

  • GitLab 17.11에서 일반적으로 사용 가능해짐. 기능 플래그 vulnerabilities_as_webhook_events 제거됨.

취약점 이벤트는 다음과 같은 경우에 트리거됩니다:

  • 취약점이 생성된 경우.

  • 취약점의 상태가 변경된 경우.

  • 이슈가 취약점에 연결된 경우.

요청 헤더:

X-Gitlab-Event: Vulnerability Hook

페이로드 예시:

{
  "object_kind": "vulnerability",
  "object_attributes": {
    "url": "https://example.com/flightjs/Flight/-/security/vulnerabilities/1",
    "title": "REXML DoS vulnerability",
    "state": "confirmed",
    "project_id": 50,
    "location": {
      "file": "Gemfile.lock",
      "dependency": {
        "package": {
          "name": "rexml"
        },
        "version": "3.3.1"
      }
    },
    "cvss": [
      {
        "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
        "vendor": "NVD"
      }
    ],
    "severity": "high",
    "severity_overridden": false,
    "identifiers": [
      {
        "name": "Gemnasium-29dce398-220a-4315-8c84-16cd8b6d9b05",
        "external_id": "29dce398-220a-4315-8c84-16cd8b6d9b05",
        "external_type": "gemnasium",
        "url": "https://gitlab.com/gitlab-org/security-products/gemnasium-db/-/blob/master/gem/rexml/CVE-2024-41123.yml"
      },
      {
        "name": "CVE-2024-41123",
        "external_id": "CVE-2024-41123",
        "external_type": "cve",
        "url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-41123"
      }
    ],
    "issues": [
      {
        "title": "REXML ReDoS vulnerability",
        "url": "https://example.com/flightjs/Flight/-/issues/1",
        "created_at": "2025-01-08T00:46:14.429Z",
        "updated_at": "2025-01-08T00:46:14.429Z"
      }
    ],
    "report_type": "dependency_scanning",
    "scanner_external_id": "gitlab-sbom-vulnerability-scanner",
    "confidence": "unknown",
    "confidence_overridden": false,
    "confirmed_at": "2025-01-08T00:46:14.413Z",
    "confirmed_by_id": 1,
    "dismissed_at": null,
    "dismissed_by_id": null,
    "resolved_at": null,
    "resolved_by_id": null,
    "auto_resolved": false,
    "resolved_on_default_branch": false,
    "created_at": "2025-01-08T00:46:14.413Z",
    "updated_at": "2025-01-08T00:46:14.413Z"
  }
}