{"meta":{"title":"커밋 상태에 대한 REST API 엔드포인트","intro":"REST API를 사용하여 커밋 상태와 상호 작용합니다.","product":"REST API","breadcrumbs":[{"href":"/ko/rest","title":"REST API"},{"href":"/ko/rest/commits","title":"커밋"},{"href":"/ko/rest/commits/statuses","title":"커밋 상태"}],"documentType":"article"},"body":"# 커밋 상태에 대한 REST API 엔드포인트\n\nREST API를 사용하여 커밋 상태와 상호 작용합니다.\n\n## 커밋 상태 정보\n\nREST API를 사용하면 외부 서비스가 커밋을 `error`, `failure`, `pending` 또는 `success` 상태로 표시할 수 있으며, 이는 해당 커밋과 관련된 끌어오기 요청에 반영됩니다. 상태에는 선택적으로 `description`와 `target_url`를 포함할 수 있으며, 이를 포함하는 것을 권장합니다. 이는 상태를 GitHub UI에서 훨씬 더 유용하게 만들기 때문입니다.\n\n예를 들어 연속 통합 서비스에서 커밋을 상태를 사용하여 빌드를 통과 또는 실패로 표시하는 것이 일반적인 용도입니다.\n`target_url`은 빌드 출력의 전체 URL이고 `description`은 빌드에서 발생한 일에 대한 상위 수준 요약입니다.\n\n상태에는 해당 상태를 제공하는 서비스를 나타내는 `context`가 포함될 수 있습니다. 예를 들어 컨텍스트가 `ci`인 연속 통합 서비스 푸시 상태와 컨텍스트가 `security`인 보안 감사 도구 푸시 상태가 있을 수 있습니다. 그런 다음 [특정 참조에 대한 결합 상태 가져오기](/ko/rest/commits/statuses#get-the-combined-status-for-a-specific-reference)에 REST API를 사용하여 커밋의 전체 상태를 검색할 수 있습니다.\n\n`repo:status`\n[OAuth 범위](/ko/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps)는 리포지토리 코드에 대한 액세스 권한 없이 상태에 대한 대상 액세스 권한을 부여합니다. 반면에, \\*\\*\\*\\* 범위는 코드 뿐만 아니라 상태에 대한 권한도 부여합니다.\n\nGitHub App을 개발 중이고 외부 서비스에 대한 더 자세한 정보를 제공하려는 경우 REST API를 검사 관리에 사용할 수 있습니다. 자세한 내용은 [검사에 대한 REST API 엔드포인트](/ko/rest/checks)을(를) 참조하세요.\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## Get the combined status for a specific reference\n\n```\nGET /repos/{owner}/{repo}/commits/{ref}/status\n```\n\nUsers with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.\nAdditionally, a combined state is returned. The state is one of:\n\nfailure if any of the contexts report as error or failure\npending if there are no statuses or a context is pending\nsuccess if the latest status for all contexts is success\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`ref`** (string) (required)\n  The commit reference. Can be a commit SHA, branch name (heads/BRANCH\\_NAME), or tag name (tags/TAG\\_NAME). For more information, see \"Git References\" in the Git documentation.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/commits/REF/status\n```\n\n**Response schema (Status: 200):**\n\n* `state`: required, string\n* `statuses`: required, array of `Simple Commit Status`:\n  * `description`: required, string or null\n  * `id`: required, integer\n  * `node_id`: required, string\n  * `state`: required, string\n  * `context`: required, string\n  * `target_url`: required, string or null, format: uri\n  * `required`: boolean or null\n  * `avatar_url`: required, string or null, format: uri\n  * `url`: required, string, format: uri\n  * `created_at`: required, string, format: date-time\n  * `updated_at`: required, string, format: date-time\n* `sha`: required, string\n* `total_count`: required, integer\n* `repository`: required, `Minimal Repository`:\n  * `id`: required, integer, format: int64\n  * `node_id`: required, string\n  * `name`: required, string\n  * `full_name`: required, string\n  * `owner`: required, `Simple User`:\n    * `name`: string or null\n    * `email`: string or null\n    * `login`: required, string\n    * `id`: required, integer, format: int64\n    * `node_id`: required, string\n    * `avatar_url`: required, string, format: uri\n    * `gravatar_id`: required, string or null\n    * `url`: required, string, format: uri\n    * `html_url`: required, string, format: uri\n    * `followers_url`: required, string, format: uri\n    * `following_url`: required, string\n    * `gists_url`: required, string\n    * `starred_url`: required, string\n    * `subscriptions_url`: required, string, format: uri\n    * `organizations_url`: required, string, format: uri\n    * `repos_url`: required, string, format: uri\n    * `events_url`: required, string\n    * `received_events_url`: required, string, format: uri\n    * `type`: required, string\n    * `site_admin`: required, boolean\n    * `starred_at`: string\n    * `user_view_type`: string\n  * `private`: required, boolean\n  * `html_url`: required, string, format: uri\n  * `description`: required, string or null\n  * `fork`: required, boolean\n  * `url`: required, string, format: uri\n  * `archive_url`: required, string\n  * `assignees_url`: required, string\n  * `blobs_url`: required, string\n  * `branches_url`: required, string\n  * `collaborators_url`: required, string\n  * `comments_url`: required, string\n  * `commits_url`: required, string\n  * `compare_url`: required, string\n  * `contents_url`: required, string\n  * `contributors_url`: required, string, format: uri\n  * `deployments_url`: required, string, format: uri\n  * `downloads_url`: required, string, format: uri\n  * `events_url`: required, string, format: uri\n  * `forks_url`: required, string, format: uri\n  * `git_commits_url`: required, string\n  * `git_refs_url`: required, string\n  * `git_tags_url`: required, string\n  * `git_url`: string\n  * `issue_comment_url`: required, string\n  * `issue_events_url`: required, string\n  * `issues_url`: required, string\n  * `keys_url`: required, string\n  * `labels_url`: required, string\n  * `languages_url`: required, string, format: uri\n  * `merges_url`: required, string, format: uri\n  * `milestones_url`: required, string\n  * `notifications_url`: required, string\n  * `pulls_url`: required, string\n  * `releases_url`: required, string\n  * `ssh_url`: string\n  * `stargazers_url`: required, string, format: uri\n  * `statuses_url`: required, string\n  * `subscribers_url`: required, string, format: uri\n  * `subscription_url`: required, string, format: uri\n  * `tags_url`: required, string, format: uri\n  * `teams_url`: required, string, format: uri\n  * `trees_url`: required, string\n  * `clone_url`: string\n  * `mirror_url`: string or null\n  * `hooks_url`: required, string, format: uri\n  * `svn_url`: string\n  * `homepage`: string or null\n  * `language`: string or null\n  * `forks_count`: integer\n  * `stargazers_count`: integer\n  * `watchers_count`: integer\n  * `size`: integer\n  * `default_branch`: string\n  * `open_issues_count`: integer\n  * `is_template`: boolean\n  * `topics`: array of string\n  * `has_issues`: boolean\n  * `has_projects`: boolean\n  * `has_wiki`: boolean\n  * `has_pages`: boolean\n  * `has_discussions`: boolean\n  * `has_pull_requests`: boolean\n  * `pull_request_creation_policy`: string, enum: `all`, `collaborators_only`\n  * `archived`: boolean\n  * `disabled`: boolean\n  * `visibility`: string\n  * `pushed_at`: string or null, format: date-time\n  * `created_at`: string or null, format: date-time\n  * `updated_at`: string or null, format: date-time\n  * `permissions`: object:\n    * `admin`: boolean\n    * `maintain`: boolean\n    * `push`: boolean\n    * `triage`: boolean\n    * `pull`: boolean\n  * `role_name`: string\n  * `temp_clone_token`: string\n  * `delete_branch_on_merge`: boolean\n  * `subscribers_count`: integer\n  * `network_count`: integer\n  * `code_of_conduct`: `Code Of Conduct`:\n    * `key`: required, string\n    * `name`: required, string\n    * `url`: required, string, format: uri\n    * `body`: string\n    * `html_url`: required, string or null, format: uri\n  * `license`: object or null:\n    * `key`: string\n    * `name`: string\n    * `spdx_id`: string\n    * `url`: string or null\n    * `node_id`: string\n  * `forks`: integer\n  * `open_issues`: integer\n  * `watchers`: integer\n  * `allow_forking`: boolean\n  * `web_commit_signoff_required`: boolean\n  * `security_and_analysis`: object or null:\n    * `advanced_security`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `code_security`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `dependabot_security_updates`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_push_protection`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_non_provider_patterns`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_ai_detection`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_delegated_alert_dismissal`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_delegated_bypass`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_delegated_bypass_options`: object:\n      * `reviewers`: array of objects:\n        * `reviewer_id`: required, integer\n        * `reviewer_type`: required, string, enum: `TEAM`, `ROLE`\n        * `mode`: string, enum: `ALWAYS`, `EXEMPT`, default: `\"ALWAYS\"`\n  * `custom_properties`: object, additional properties allowed\n* `commit_url`: required, string, format: uri\n* `url`: required, string, format: uri\n\n## List commit statuses for a reference\n\n```\nGET /repos/{owner}/{repo}/commits/{ref}/statuses\n```\n\nUsers with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.\nThis resource is also available via a legacy route: GET /repos/:owner/:repo/statuses/:ref.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`ref`** (string) (required)\n  The commit reference. Can be a commit SHA, branch name (heads/BRANCH\\_NAME), or tag name (tags/TAG\\_NAME). For more information, see \"Git References\" in the Git documentation.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **301** - Moved permanently\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/commits/REF/statuses\n```\n\n**Response schema (Status: 200):**\n\nArray of `Status`:\n\n* `url`: required, string\n* `avatar_url`: required, string or null\n* `id`: required, integer\n* `node_id`: required, string\n* `state`: required, string\n* `description`: required, string or null\n* `target_url`: required, string or null\n* `context`: required, string\n* `created_at`: required, string\n* `updated_at`: required, string\n* `creator`: required, any of:\n  * **null**\n  * **Simple User**\n    * `name`: string or null\n    * `email`: string or null\n    * `login`: required, string\n    * `id`: required, integer, format: int64\n    * `node_id`: required, string\n    * `avatar_url`: required, string, format: uri\n    * `gravatar_id`: required, string or null\n    * `url`: required, string, format: uri\n    * `html_url`: required, string, format: uri\n    * `followers_url`: required, string, format: uri\n    * `following_url`: required, string\n    * `gists_url`: required, string\n    * `starred_url`: required, string\n    * `subscriptions_url`: required, string, format: uri\n    * `organizations_url`: required, string, format: uri\n    * `repos_url`: required, string, format: uri\n    * `events_url`: required, string\n    * `received_events_url`: required, string, format: uri\n    * `type`: required, string\n    * `site_admin`: required, boolean\n    * `starred_at`: string\n    * `user_view_type`: string\n\n## Create a commit status\n\n```\nPOST /repos/{owner}/{repo}/statuses/{sha}\n```\n\nUsers with push access in a repository can create commit statuses for a given SHA.\nNote: there is a limit of 1000 statuses per sha and context within a repository. Attempts to create more than 1000 statuses will result in a validation error.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`sha`** (string) (required)\n\n#### Body parameters\n\n* **`state`** (string) (required)\n  The state of the status.\n  Can be one of: `error`, `failure`, `pending`, `success`\n\n* **`target_url`** (string or null)\n  The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status.\n  For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:\n  <http://ci.example.com/user/repo/build/sha>\n\n* **`description`** (string or null)\n  A short description of the status.\n\n* **`context`** (string)\n  A string label to differentiate this status from the status of other systems. This field is case-insensitive.\n  Default: `default`\n\n### HTTP response status codes\n\n* **201** - Created\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/repos/OWNER/REPO/statuses/SHA \\\n  -d '{\n  \"state\": \"success\",\n  \"target_url\": \"https://example.com/build/status\",\n  \"description\": \"The build succeeded!\",\n  \"context\": \"continuous-integration/jenkins\"\n}'\n```\n\n**Response schema (Status: 201):**\n\n* `url`: required, string\n* `avatar_url`: required, string or null\n* `id`: required, integer\n* `node_id`: required, string\n* `state`: required, string\n* `description`: required, string or null\n* `target_url`: required, string or null\n* `context`: required, string\n* `created_at`: required, string\n* `updated_at`: required, string\n* `creator`: required, any of:\n  * **null**\n  * **Simple User**\n    * `name`: string or null\n    * `email`: string or null\n    * `login`: required, string\n    * `id`: required, integer, format: int64\n    * `node_id`: required, string\n    * `avatar_url`: required, string, format: uri\n    * `gravatar_id`: required, string or null\n    * `url`: required, string, format: uri\n    * `html_url`: required, string, format: uri\n    * `followers_url`: required, string, format: uri\n    * `following_url`: required, string\n    * `gists_url`: required, string\n    * `starred_url`: required, string\n    * `subscriptions_url`: required, string, format: uri\n    * `organizations_url`: required, string, format: uri\n    * `repos_url`: required, string, format: uri\n    * `events_url`: required, string\n    * `received_events_url`: required, string, format: uri\n    * `type`: required, string\n    * `site_admin`: required, boolean\n    * `starred_at`: string\n    * `user_view_type`: string"}