웹후크 이벤트 및 페이로드 정보
이 페이지에 나열된 이벤트를 구독하는 웹후크를 만들 수 있습니다. 서버에 대한 HTTP 요청 수를 제한하려면 처리하려는 특정 이벤트만 구독해야 합니다. 자세한 내용은 웹후크 만들기을(를) 참조하세요.
이 페이지의 각 웹후크 이벤트에는 해당 이벤트에 대한 웹후크 속성 설명이 포함되어 있습니다. 이벤트에 여러 작업이 있는 경우 각 작업에 해당하는 속성이 포함되어 있습니다.
각 이벤트는 특정 유형의 웹후크에서만 사용할 수 있습니다. 예를 들어 조직 웹후크는 team 이벤트를 구독할 수 있지만 리포지토리 웹후크는 구독할 수 없습니다. 각 웹후크 이벤트에 대한 설명에는 해당 이벤트의 사용 가능성이 나열되어 있습니다. 자세한 내용은 웹후크 유형을(를) 참조하세요.
sender 속성
대부분의 웹후크 페이로드에는 이벤트를 트리거한 사용자를 식별하는 속성이 포함 sender 됩니다.
GitHub 이벤트가 사람이 아닌 내부 프로세스에서 발생하거나 트리거 작업에 연결된 사용자가 없는 경우와 같이 특정 사용자를 확인할 수 없는 경우가 있습니다. 이러한 check_run``check_suite일부 이벤트의 경우 Git 푸시 또는 인증된 API 행위자가 없는 작업이 포함됩니다.
이러한 경우 sender는 ghost 사용자로 채워지며, 그 login가 ghost이며 id이 실제 현재 사용자에 연결되지 않은 자리 표시자 계정입니다.
sender이 항상 이벤트를 발생시킨 사람을 식별한다고 가정하지 말고, 이에 의존하는 모든 보안 또는 비즈니스 로직에서 ghost 사용자를 고려하세요.
페이로드 한도
페이로드는 25MB로 제한됩니다. 이벤트가 더 큰 페이로드를 생성하는 경우 GitHub이(가) 해당 웹후크 이벤트에 대한 페이로드를 제공하지 않습니다. 예를 들어 여러 분기 또는 태그가 한 번에 푸시되는 경우 create 이벤트에 대해 발생할 수 있습니다. 배달을 보장하기 위해 페이로드 크기를 모니터링하는 것이 좋습니다.
전송 헤더
웹후크의 구성된 URL 엔드포인트로 배달되는 HTTP POST 페이로드는 다음과 같은 몇 가지 특수 헤더를 포함합니다.
X-GitHub-Hook-ID: 웹후크의 고유 식별자입니다.X-GitHub-Event: 배달을 트리거한 이벤트의 이름입니다.X-GitHub-Delivery: 이벤트를 식별하는 GUID(Globally Unique Identifier)입니다.X-Hub-Signature: 웹후크가secret으로 구성된 경우 이 헤더가 전송됩니다. 이는 요청 본문의 HMAC 16진수 다이제스트이며 SHA-1 해시 함수 및secret을 HMACkey로 사용하여 생성됩니다.X-Hub-Signature는 기존 통합과의 호환성을 위해 제공됩니다. 대신 더 안전한X-Hub-Signature-256을 사용하는 것이 좋습니다.X-Hub-Signature-256: 웹후크가secret으로 구성된 경우 이 헤더가 전송됩니다. 이는 요청 본문의 HMAC 16진수 다이제스트이며 SHA-256 해시 함수 및secret을 HMACkey로 사용하여 생성됩니다. 자세한 내용은 웹후크 제공 유효성 검사하기을(를) 참조하세요.User-Agent: 이 헤더에는 항상 접두사GitHub-Hookshot/있습니다.X-GitHub-Hook-Installation-Target-Type: 웹후크가 만들어진 리소스의 유형입니다.X-GitHub-Hook-Installation-Target-ID: 웹후크가 만들어진 리소스의 고유 식별자입니다.
웹후크 페이로드에서 각 헤더가 어떻게 표시되는지 확인하려면 웹후크 배달 예를 참조하세요.
웹후크 배달 예시
페이로드를 JSON 형식(application/json) 또는 URL로 인코딩된 데이터(x-www-form-urlencoded)로 배달하도록 선택할 수 있습니다. 다음은 JSON 형식을 사용하는 웹후크 POST 요청의 예입니다.
> POST /payload HTTP/1.1
> X-GitHub-Delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958
> X-Hub-Signature: sha1=7d38cdd689735b008b3c702edd92eea23791c5f6
> X-Hub-Signature-256: sha256=d57c68ca6f92289e6987922ff26938930f6e66a2d161ef06abdf1859230aa23c
> User-Agent: GitHub-Hookshot/044aadd
> Content-Type: application/json
> Content-Length: 6615
> X-GitHub-Event: issues
> X-GitHub-Hook-ID: 292430182
> X-GitHub-Hook-Installation-Target-ID: 79929171
> X-GitHub-Hook-Installation-Target-Type: repository
> {
> "action": "opened",
> "issue": {
> "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
> "number": 1347,
> ...
> },
> "repository" : {
> "id": 1296269,
> "full_name": "octocat/Hello-World",
> "owner": {
> "login": "octocat",
> "id": 1,
> ...
> },
> ...
> },
> "sender": {
> "login": "octocat",
> "id": 1,
> ...
> }
> }
branch_protection_configuration
This event occurs when there is a change to branch protection configurations for a repository. For more information, see "About protected branches." For information about using the APIs to manage branch protection rules, see "Branch protection rule" in the GraphQL documentation or "Branch protection" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission.
branch_protection_configuration 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
branch_protection_configuration에 대한 웹후크 페이로드 개체
All branch protections were disabled for a repository.
| 이름, 유형, 설명 |
|---|
action string 필수값: |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
organization object A GitHub organization. Webhook payloads contain the |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
sender object 필수A GitHub user. |
branch_protection_rule
This event occurs when there is activity relating to branch protection rules. For more information, see "About protected branches." For information about the APIs to manage branch protection rules, see the GraphQL documentation or "Branch protection" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission.
branch_protection_rule 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
branch_protection_rule에 대한 웹후크 페이로드 개체
A branch protection rule was created.
| 이름, 유형, 설명 |
|---|
action string 필수값: |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
organization object A GitHub organization. Webhook payloads contain the |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
rule object 필수The branch protection rule. Includes a |
Properties of |
sender object 필수A GitHub user. |
check_run
This event occurs when there is activity relating to a check run. For information about check runs, see "Getting started with the Checks API." For information about the APIs to manage check runs, see the GraphQL API documentation or "Check Runs" in the REST API documentation.
For activity relating to check suites, use the check-suite event.
To subscribe to this event, a GitHub App must have at least read-level access for the "Checks" repository permission. To receive the rerequested and requested_action event types, the app must have at least write-level access for the "Checks" permission. GitHub Apps with write-level access for the "Checks" permission are automatically subscribed to this webhook event.
Repository and organization webhooks only receive payloads for the created and completed event types in repositories.
The API only looks for pushes in the repository where the check run was created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
check_run 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
check_run에 대한 웹후크 페이로드 개체
A check run was completed, and a conclusion is available.
| 이름, 유형, 설명 |
|---|
action string 값: |
check_run object 필수A check performed on the code of a given code change |
Properties of |
installation object The GitHub App installation. Webhook payloads contain the |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
organization object A GitHub organization. Webhook payloads contain the |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
sender object 필수A GitHub user. |
check_suite
This event occurs when there is activity relating to a check suite. For information about check suites, see "Getting started with the Checks API." For information about the APIs to manage check suites, see the GraphQL API documentation or "Check Suites" in the REST API documentation.
For activity relating to check runs, use the check_run event.
To subscribe to this event, a GitHub App must have at least read-level access for the "Checks" permission. To receive the requested and rerequested event types, the app must have at least write-level access for the "Checks" permission. GitHub Apps with write-level access for the "Checks" permission are automatically subscribed to this webhook event.
Repository and organization webhooks only receive payloads for the completed event types in repositories.
The API only looks for pushes in the repository where the check suite was created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
check_suite 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
check_suite에 대한 웹후크 페이로드 개체
All check runs in a check suite have completed, and a conclusion is available.
| 이름, 유형, 설명 |
|---|
action string 필수값: |
check_suite object 필수The check_suite. |
Properties of |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
organization object A GitHub organization. Webhook payloads contain the |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
sender object 필수A GitHub user. |
code_scanning_alert
This event occurs when there is activity relating to code scanning alerts in a repository. For more information, see "About code scanning" and "About code scanning alerts." For information about the API to manage code scanning, see "Code scanning" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Code scanning alerts" repository permission.
code_scanning_alert 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
code_scanning_alert에 대한 웹후크 페이로드 개체
A previously created code scanning alert appeared in another branch. This can happen when a branch is merged into or created from a branch with a pre-existing code scanning alert.
| 이름, 유형, 설명 |
|---|
action string 필수값: |
alert object 필수The code scanning alert involved in the event. |
Properties of |
commit_oid string 필수The commit SHA of the code scanning alert. When the action is |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
organization object A GitHub organization. Webhook payloads contain the |
ref string 필수The Git reference of the code scanning alert. When the action is |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
sender object 필수A GitHub user. |
commit_comment
This event occurs when there is activity relating to commit comments. For more information about commit comments, see "Commenting on a pull request." For information about the APIs to manage commit comments, see the GraphQL API documentation or "Commit comments" in the REST API documentation.
For activity relating to comments on pull request reviews, use the pull_request_review_comment event. For activity relating to issue comments, use the issue_comment event. For activity relating to discussion comments, use the discussion_comment event.
To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.
commit_comment 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
commit_comment에 대한 웹후크 페이로드 개체
Someone commented on a commit.
| 이름, 유형, 설명 |
|---|
action string 필수The action performed. Can be 값: |
comment object 필수The commit comment resource. |
Properties of |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
organization object A GitHub organization. Webhook payloads contain the |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
sender object 필수A GitHub user. |
create
This event occurs when a Git branch or tag is created.
To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.
Notes:
- This event will not occur when more than three tags are created at once.
- Payloads are capped at 25 MB. If an event generates a larger payload, GitHub will not deliver a payload for that webhook event. This may happen, for example, if many branches or tags are pushed at once. We suggest monitoring your payload size to ensure delivery.
create 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
create에 대한 웹후크 페이로드 개체
| 이름, 유형, 설명 |
|---|
description string or null 필수The repository's current description. |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
master_branch string 필수The name of the repository's default branch (usually |
organization object A GitHub organization. Webhook payloads contain the |
pusher_type string 필수The pusher type for the event. Can be either |
ref string 필수The |
ref_type string 필수The type of Git ref object created in the repository. 다음 중 하나일 수 있습니다.: |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
sender object 필수A GitHub user. |
custom_property
This event occurs when there is activity relating to a custom property.
For more information, see "Managing custom properties for repositories in your organization". For information about the APIs to manage custom properties, see "Custom properties" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Custom properties" organization permission.
custom_property 사용 가능성
- 엔터프라이즈
- 조직
- GitHub 앱
custom_property에 대한 웹후크 페이로드 개체
A new custom property was created.
| 이름, 유형, 설명 |
|---|
action string 필수값: |
definition object 필수Custom property defined on an organization |
Properties of |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
organization object A GitHub organization. Webhook payloads contain the |
sender object A GitHub user. |
custom_property_values
This event occurs when there is activity relating to custom property values for a repository.
For more information, see "Managing custom properties for repositories in your organization". For information about the APIs to manage custom properties for a repository, see "Custom properties" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Custom properties" organization permission.
custom_property_values 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
custom_property_values에 대한 웹후크 페이로드 개체
The custom property values of a repository were updated.
| 이름, 유형, 설명 |
|---|
action string 필수값: |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
organization object 필수A GitHub organization. Webhook payloads contain the |
sender object A GitHub user. |
new_property_values array of objects 필수The new custom property values for the repository. |
Properties of |
old_property_values array of objects 필수The old custom property values for the repository. |
Properties of |
delete
This event occurs when a Git branch or tag is deleted. To subscribe to all pushes to a repository, including
branch and tag deletions, use the push webhook event.
To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.
This event will not occur when more than three tags are deleted at once.
delete 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
delete에 대한 웹후크 페이로드 개체
| 이름, 유형, 설명 |
|---|
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
organization object A GitHub organization. Webhook payloads contain the |
pusher_type string 필수The pusher type for the event. Can be either |
ref string 필수The |
ref_type string 필수The type of Git ref object deleted in the repository. 다음 중 하나일 수 있습니다.: |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
sender object 필수A GitHub user. |
dependabot_alert
This event occurs when there is activity relating to Dependabot alerts.
For more information about Dependabot alerts, see "About Dependabot alerts." For information about the API to manage Dependabot alerts, see "Dependabot alerts" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Dependabot alerts" repository permission.
dependabot_alert 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
dependabot_alert에 대한 웹후크 페이로드 개체
The assignees for a Dependabot alert were updated.
| 이름, 유형, 설명 |
|---|
action string 필수값: |
alert object 필수A Dependabot alert. |
Properties of |
installation object The GitHub App installation. Webhook payloads contain the |
organization object A GitHub organization. Webhook payloads contain the |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
sender object 필수A GitHub user. |
deploy_key
This event occurs when there is activity relating to deploy keys. For more information, see "Managing deploy keys." For information about the APIs to manage deploy keys, see the GraphQL API documentation or "Deploy keys" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Deployments" repository permission.
deploy_key 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
deploy_key에 대한 웹후크 페이로드 개체
A deploy key was created.
| 이름, 유형, 설명 |
|---|
action string 필수값: |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
key object 필수The |
Properties of |
organization object A GitHub organization. Webhook payloads contain the |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
sender object 필수A GitHub user. |
deployment
This event occurs when there is activity relating to deployments. For more information, see "About deployments." For information about the APIs to manage deployments, see the GraphQL API documentation or "Deployments" in the REST API documentation.
For activity relating to deployment status, use the deployment_status event.
To subscribe to this event, a GitHub App must have at least read-level access for the "Deployments" repository permission.
deployment 사용 가능성
- 리포지토리
- 조직
- GitHub 앱
deployment에 대한 웹후크 페이로드 개체
A deployment was created.
| 이름, 유형, 설명 |
|---|
action string 필수값: |
deployment object 필수The deployment. |
Properties of |
enterprise object An enterprise on GitHub. Webhook payloads contain the |
installation object The GitHub App installation. Webhook payloads contain the |
organization object A GitHub organization. Webhook payloads contain the |
repository object 필수The repository on GitHub where the event occurred. Webhook payloads contain the |
sender object 필수A GitHub user. |
workflow object or null 필수 |
Properties of |
workflow_run object or null 필수 |
Properties of |