此版本的 GitHub Enterprise 已停止服务 2021-09-23. 即使针对重大安全问题,也不会发布补丁。 要获得更好的性能、改进的安全性和新功能,请升级到 GitHub Enterprise 的最新版本。 如需升级方面的帮助,请联系 GitHub Enterprise 支持

Web 挂钩事件和有效负载

对于每个 web 挂钩事件,您可以查看事件发生的时间、示例有效负载以及有关有效负载对象参数的说明。

企业帐户可用于 GitHub Enterprise Cloud 和 GitHub Enterprise Server。

在企业帐户或企业帐户中的组织上配置的 web 挂钩将包括 enterprise 帐户对象。

配置 web 挂钩时,您可以使用 UI 或 API 选择哪些事件将向您发送有效负载。 仅订阅您计划处理的特定事件可限制对服务器的 HTTP 请求数。 您也可以订阅所有当前和未来的事件。 默认情况下,web 挂钩只订阅推送事件。 您可以随时更改订阅事件的列表。

您可以创建订阅此页所列事件的 web 挂钩。 每个 web 挂钩事件都包括 web 挂钩属性的说明和示例有效负载。 更多信息请参阅“创建 web 挂钩”。

Web 挂钩有效负载对象共有属性

每个 web 挂钩事件有效负载还包含特定于事件的属性。 您可以在各个事件类型部分中找到这些独特属性。

类型描述
action字符串大多数 web 挂钩有效负载都包括 action 属性,其中包含触发事件的特定活动。
senderobject触发事件的用户。 此属性包含在每个 web 挂钩有效负载中。
repositoryobject事件发生所在的 repository。 当事件发生源于仓库中的活动时,web 挂钩有效负载包含 repository 属性。
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。 更多信息请参阅“构建 GitHub 应用程序”。

Web 挂钩事件的独特属性与您使用事件 API 时在 payload 属性中发现的属性相同。 唯一的例外是 push 事件push 事件 web 挂钩有效负载的独特属性与 Events API 中的 payload 属性不同。 Web 挂钩有效负载包含更详细的信息。

注:有效负载的上限为 25 MB。 如果事件生成了更大的有效负载,web 挂钩将不会触发。 例如,如果同时推送多个分支或标记,这种情况可能会发生在 create 事件中。 我们建议监控有效负载的大小以确保成功递送。

递送标头

递送到 web 挂钩已配置 URL 端点的 HTTP POST 有效负载将包含几个特殊标头:

标头描述
X-GitHub-Event触发递送的事件名称。
X-GitHub-Delivery用于标识递送的 GUID
X-GitHub-Enterprise-Version发送 HTTP POST 有效负载的 GitHub Enterprise Server 实例的版本。
X-GitHub-Enterprise-Host发送 HTTP POST 有效负载的 GitHub Enterprise Server 实例的主机名。
X-Hub-Signature如果使用 secret 配置了 web 挂钩,则发送此标头。 这是请求正文的 HMAC 十六进制摘要,它是使用 SHA-1 哈希函数和作为 HMAC keysecret 生成的。

此外,请求的 User-Agent 将含有前缀 GitHub-Hookshot/

递送示例

> POST /payload HTTP/2 > Host: localhost:4567 > X-GitHub-Delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958 > X-GitHub-Enterprise-Version: 2.15.0 > X-GitHub-Enterprise-Host: example.com > X-Hub-Signature: sha1=7d38cdd689735b008b3c702edd92eea23791c5f6 > User-Agent: GitHub-Hookshot/044aadd > Content-Type: application/json > Content-Length: 6615 > X-GitHub-Event: issues > { > "action": "opened", > "issue": { > "url": "http(s)://[hostname]/api/v3/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, > ... > } > }

check_run

检查运行活动已发生。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“检查运行”REST API。

注:检查 API 仅在创建检查套件或检查运行的仓库中搜索推送。 未检测到向复刻的仓库中分支的推送,为 head_branch 返回空的 pull_requests 数组和 null 值。

可用性

  • 仓库 web 挂钩只接收仓库中 createdcompleted 事件类型的有效负载
  • 组织 web 挂钩只接收仓库中 createdcompleted 事件类型的有效负载
  • GitHub 应用程序 with the checks:read permission receive payloads for the created and completed events that occur in the repository where the app is installed. 应用程序必须具有 checks:write 权限才能接收 rerequestedrequested_action 事件类型。 rerequestedrequested_action 事件类型有效负载仅发送到被请求的 GitHub 应用程序。 GitHub 应用程序 with the checks:write are automatically subscribed to this webhook event.

Web 挂钩有效负载对象

类型描述
action字符串执行的操作。 可以是以下选项之一:
  • created - 创建了新的检查运行。
  • completed - 检查运行的“状态”为“已完成”。
  • rerequested - 有人请求从拉取请求 UI 重新运行检查。 有关 GitHub UI 的更多信息,请参阅“关于状态检查](/articles/about-status-checks#checks)”。 收到 rerequested 操作时,您需要创建新的检查运行。 仅当有人请求重新运行检查时,GitHub 应用程序 才会收到 rerequested 有效负载。
  • requested_action - 有人请求执行应用程序提供的操作。 仅当有人请求执行操作时,GitHub 应用程序 才会收到 requested_action 有效负载。 有关检查运行和请求操作的更多信息,请参阅“检查运行和请求操作”。
check_run对象check_run
check_run[status]字符串检查运行的当前状态。 可以是 queuedin_progresscompleted
check_run[conclusion]字符串已完成检查运行的结果。 可以是以下项之一:successfailureneutralcancelledtimed_outaction_requiredstale。 此值将为 null,直到检查运行 completed
check_run[name]字符串检查运行的名称。
check_run[check_suite][id]整数此检查运行所属检查套件的 ID。
check_run[check_suite][pull_requests]数组匹配此检查套件的拉取请求数组。 拉取请求与检查套件匹配的条件是它们有相同的 head_shahead_branch。 当检查套件的 head_brant 在复刻的仓库中时,它将是 null 并且 pull_request 数组是空的。
requested_action对象用户请求的操作。
requested_action[identifier]字符串用户请求的操作的集成器引用。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "created", "check_run": { "id": 2, "node_id": "MDg6Q2hlY2tSdW4y", "head_sha": "14977a7b5485400124827221a04bfb474bcd72d1", "external_id": "", "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/check-runs/2", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/runs/2", "details_url": "https://octocoders.io", "status": "queued", "conclusion": null, "started_at": "2019-05-15T19:39:04Z", "completed_at": null, "output": { "title": null, "summary": null, "text": null, "annotations_count": 0, "annotations_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/check-runs/2/annotations" }, "name": "Octocoders-linter", "check_suite": { "id": 9, "node_id": "MDEwOkNoZWNrU3VpdGU5", "head_branch": "changes", "head_sha": "14977a7b5485400124827221a04bfb474bcd72d1", "status": "queued", "conclusion": null, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/check-suites/9", "before": "4544205a385319fd846d5df4ed2e3b8173529d78", "after": "14977a7b5485400124827221a04bfb474bcd72d1", "pull_requests": [ { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2", "id": 2, "number": 2, "head": { "ref": "changes", "sha": "14977a7b5485400124827221a04bfb474bcd72d1", "repo": { "id": 118, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "name": "Hello-World" } }, "base": { "ref": "master", "sha": "78a96099c3f442d7f6e8d1a7d07090091993e65a", "repo": { "id": 118, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "name": "Hello-World" } } } ], "app": { "id": 2, "node_id": "MDM6QXBwMg==", "owner": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Octocoders", "html_url": "https://octocoders.github.io/Octocoders", "followers_url": "https://octocoders.github.io/api/v3/users/Octocoders/followers", "following_url": "https://octocoders.github.io/api/v3/users/Octocoders/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Octocoders/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Octocoders/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Octocoders/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Octocoders/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/users/Octocoders/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Octocoders/received_events", "type": "Organization", "site_admin": false }, "name": "octocoders-linter", "description": "", "external_url": "https://octocoders.io", "html_url": "https://octocoders.github.io/github-apps/octocoders-linter", "created_at": "2019-05-15T15:41:35Z", "updated_at": "2019-05-15T15:41:35Z", "permissions": { "administration": "write", "checks": "write", "contents": "write", "deployments": "write", "issues": "write", "metadata": "read", "pages": "write", "pull_requests": "write", "repository_hooks": "write", "repository_projects": "write", "vulnerability_alerts": "read", "statuses": "write", "members": "write", "organization_user_blocking": "write", "organization_projects": "write", "team_discussions": "write", "organization_hooks": "write", "repository_pre_receive_hooks": "write", "organization_pre_receive_hooks": "write" }, "events": [ "check_run", "check_suite", "commit_comment", "create", "delete", "deployment", "deployment_status", "fork", "gollum", "issues", "issue_comment", "label", "member", "membership", "milestone", "organization", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "push", "release", "repository", "status", "team", "team_add", "watch" ] }, "created_at": "2019-05-15T19:38:27Z", "updated_at": "2019-05-15T19:38:27Z" }, "app": { "id": 2, "node_id": "MDM6QXBwMg==", "owner": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Octocoders", "html_url": "https://octocoders.github.io/Octocoders", "followers_url": "https://octocoders.github.io/api/v3/users/Octocoders/followers", "following_url": "https://octocoders.github.io/api/v3/users/Octocoders/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Octocoders/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Octocoders/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Octocoders/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Octocoders/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/users/Octocoders/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Octocoders/received_events", "type": "Organization", "site_admin": false }, "name": "octocoders-linter", "description": "", "external_url": "https://octocoders.io", "html_url": "https://octocoders.github.io/github-apps/octocoders-linter", "created_at": "2019-05-15T15:41:35Z", "updated_at": "2019-05-15T15:41:35Z", "permissions": { "administration": "write", "checks": "write", "contents": "write", "deployments": "write", "issues": "write", "metadata": "read", "pages": "write", "pull_requests": "write", "repository_hooks": "write", "repository_projects": "write", "vulnerability_alerts": "read", "statuses": "write", "members": "write", "organization_user_blocking": "write", "organization_projects": "write", "team_discussions": "write", "organization_hooks": "write", "repository_pre_receive_hooks": "write", "organization_pre_receive_hooks": "write" }, "events": [ "check_run", "check_suite", "commit_comment", "create", "delete", "deployment", "deployment_status", "fork", "gollum", "issues", "issue_comment", "label", "member", "membership", "milestone", "organization", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "push", "release", "repository", "status", "team", "team_add", "watch" ] }, "pull_requests": [ { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2", "id": 2, "number": 2, "head": { "ref": "changes", "sha": "14977a7b5485400124827221a04bfb474bcd72d1", "repo": { "id": 118, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "name": "Hello-World" } }, "base": { "ref": "master", "sha": "78a96099c3f442d7f6e8d1a7d07090091993e65a", "repo": { "id": 118, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "name": "Hello-World" } } } ] }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:27Z", "pushed_at": "2019-05-15T19:38:23Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

check_suite

检查套件活动已发生。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“检查套件”REST API。

注:检查 API 仅在创建检查套件或检查运行的仓库中搜索推送。 未检测到向复刻的仓库中分支的推送,为 head_branch 返回空的 pull_requests 数组和 null 值。

可用性

  • 仓库 web 挂钩只接收仓库中 completed 事件类型的有效负载
  • 组织 web 挂钩只接收仓库中 completed 事件类型的有效负载
  • GitHub 应用程序 with the checks:read permission receive payloads for the created and completed events that occur in the repository where the app is installed. 应用程序必须具有 checks:write 权限才能接收 requestedrerequested 事件类型。 requestedrerequested 事件类型有效负载仅发送到被请求的 GitHub 应用程序。 GitHub 应用程序 with the checks:write are automatically subscribed to this webhook event.

Web 挂钩有效负载对象

类型描述
action字符串执行的操作。 可以是:
  • completed - 检查套件中的所有检查运行已完成。
  • requested - 新代码被推送到应用程序的仓库时发生。 收到 requested 操作事件时,您需要创建新的检查运行
  • rerequested - 有人请求从拉取请求 UI 重新运行整个检查套件时发生。 收到 rerequested 操作事件时,您需要创建新的检查运行。 有关 GitHub UI 的更多信息,请参阅“关于状态检查](/articles/about-status-checks#checks)”。
check_suite对象check_suite
check_suite[head_branch]字符串更改所在的头部分支的名称。
check_suite[head_sha]字符串此检查套件的最新提交的 SHA。
check_suite[status]字符串检查套件中所有检查运行的摘要状态。 可以是 requestedin_progresscompleted
check_suite[conclusion]字符串检查套件中所有检查运行的摘要结论。 可以是以下项之一:successfailureneutralcancelledtimed_outaction_requiredstale。 此值将为 null,直到检查运行 completed
check_suite[url]字符串指向检查套件 API 资源的 URL。
check_suite[pull_requests]数组匹配此检查套件的拉取请求数组。 拉取请求与检查套件匹配的条件是它们有相同的 head_shahead_branch。 检查套件的 head_branch 在复刻仓库中时,它将为 null,并且 pull_requests 数组将为空。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "completed", "check_suite": { "id": 9, "node_id": "MDEwOkNoZWNrU3VpdGU5", "head_branch": "changes", "head_sha": "14977a7b5485400124827221a04bfb474bcd72d1", "status": "completed", "conclusion": "success", "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/check-suites/9", "before": "4544205a385319fd846d5df4ed2e3b8173529d78", "after": "14977a7b5485400124827221a04bfb474bcd72d1", "pull_requests": [ { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2", "id": 2, "number": 2, "head": { "ref": "changes", "sha": "14977a7b5485400124827221a04bfb474bcd72d1", "repo": { "id": 118, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "name": "Hello-World" } }, "base": { "ref": "master", "sha": "78a96099c3f442d7f6e8d1a7d07090091993e65a", "repo": { "id": 118, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "name": "Hello-World" } } } ], "app": { "id": 2, "node_id": "MDM6QXBwMg==", "owner": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Octocoders", "html_url": "https://octocoders.github.io/Octocoders", "followers_url": "https://octocoders.github.io/api/v3/users/Octocoders/followers", "following_url": "https://octocoders.github.io/api/v3/users/Octocoders/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Octocoders/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Octocoders/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Octocoders/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Octocoders/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/users/Octocoders/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Octocoders/received_events", "type": "Organization", "site_admin": false }, "name": "octocoders-linter", "description": "", "external_url": "https://octocoders.io", "html_url": "https://octocoders.github.io/github-apps/octocoders-linter", "created_at": "2019-05-15T15:41:35Z", "updated_at": "2019-05-15T15:41:35Z", "permissions": { "administration": "write", "checks": "write", "contents": "write", "deployments": "write", "issues": "write", "metadata": "read", "pages": "write", "pull_requests": "write", "repository_hooks": "write", "repository_projects": "write", "vulnerability_alerts": "read", "statuses": "write", "members": "write", "organization_user_blocking": "write", "organization_projects": "write", "team_discussions": "write", "organization_hooks": "write", "repository_pre_receive_hooks": "write", "organization_pre_receive_hooks": "write" }, "events": [ "check_run", "check_suite", "commit_comment", "create", "delete", "deployment", "deployment_status", "fork", "gollum", "issues", "issue_comment", "label", "member", "membership", "milestone", "organization", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "push", "release", "repository", "status", "team", "team_add", "watch" ] }, "created_at": "2019-05-15T19:38:27Z", "updated_at": "2019-05-15T19:39:09Z", "latest_check_runs_count": 1, "check_runs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/check-suites/9/check-runs", "head_commit": { "id": "14977a7b5485400124827221a04bfb474bcd72d1", "tree_id": "31b122c26a97cf9af023e9ddab94a82c6e77b0ea", "message": "Update README.md", "timestamp": "2019-05-15T19:38:01Z", "author": { "name": "Codertocat", "email": "Codertocat@Octocoders.io" }, "committer": { "name": "Codertocat", "email": "Codertocat@Octocoders.io" } } }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:27Z", "pushed_at": "2019-05-15T19:38:23Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

code_scanning_alert

与仓库中的代码扫描警报相关的活动。 活动类型在有效负载对象的操作属性中指定。 更多信息请参阅“关于代码扫描”。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the security_events :read permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是以下项之一:createdreopened_by_userclosed_by_userfixedappeared_in_branchreopened
警报对象事件中涉及的代码扫描警报。
ref字符串代码扫描警报的 Git 引用。 当操作为 reopened_by_userclosed_by_user 时,事件由 sender 触发,此值将为空。
commit_oid字符串代码扫描警报的提交 SHA。 当操作为 reopened_by_userclosed_by_user 时,事件由 sender 触发,此值将为空。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject如果 actionreopened_by_userclosed_by_user,则 sender 对象将是触发事件的用户。 The sender object is empty for all other actions.

Web 挂钩有效负载示例

{ "action": "reopened", "alert": { "number": 10, "created_at": "2020-07-22T14:06:31Z", "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/code-scanning/alerts/10", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/security/code-scanning/10", "instances": [ { "ref": "refs/heads/main", "analysis_key": ".github/workflows/workflow.yml:upload", "environment": "{}", "state": "open" } ], "state": "open", "dismissed_by": null, "dismissed_at": null, "dismissed_reason": null, "rule": { "id": "Style/FrozenStringLiteralComment", "severity": "note", "description": "Add the frozen_string_literal comment to the top of files to help transition to frozen string literals by default." }, "tool": { "name": "Rubocop", "version": null } }, "ref": "refs/heads/main", "commit_oid": "d6e4c75c141dbacecc279b721b8b9393d5405795", "repository": { "id": 186853002, "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T15:19:25Z", "updated_at": "2019-05-15T15:19:27Z", "pushed_at": "2019-05-15T15:20:32Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "main" }, "organization": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "url": "https://octocoders.github.io/api/v3/orgs/Octocoders", "repos_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/events", "hooks_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/hooks", "issues_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/issues", "members_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/members{/member}", "public_members_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/public_members{/member}", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "description": "" } } 

commit_comment

提交评论已创建。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“提交评论”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the contents permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作。 可以是 created
注释,评论对象提交评论资源。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "created", "comment": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments/2", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/commit/4544205a385319fd846d5df4ed2e3b8173529d78#commitcomment-2", "id": 2, "node_id": "MDEzOkNvbW1pdENvbW1lbnQy", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "position": null, "line": null, "path": null, "commit_id": "4544205a385319fd846d5df4ed2e3b8173529d78", "created_at": "2019-05-15T19:38:09Z", "updated_at": "2019-05-15T19:38:09Z", "author_association": "OWNER", "body": "This is a really good change! :+1:" }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

content_reference

新的内容引用为 created。 当议题或拉取请求的正文或注释包含与配置的内容引用域匹配的 URL 时,将创建新的内容引用。 有关内容引用和附件的更多信息,请参阅“使用内容附件”。

Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如果您注册了一个子域 (https://subdomain.example.com),则只有该子域的 URL 才会触发此事件。 如果您注册了一个域 (https://example.com),则该域及所有子域的 URL 都会触发此事件。 请参阅“创建内容附件”以创建新的内容附件。

可用性

  • GitHub 应用程序 with the content_references:write permission

Web 挂钩有效负载示例

{ "action": "created", "content_reference": { "id": 17, "node_id": "MDE2OkNvbnRlbnRSZWZlcmVuY2UxNjA5", "reference": "https://errors.ai/" }, "repository": { "id": 145551601, "node_id": "MDEwOlJlcG9zaXRvcnkxNDU1NTE2MDE=", "name": "hello-world", "full_name": "octocoders/hello-world", "private": true, "owner": { "login": "Codertocat", "id": 7718702, "node_id": "MDQ6VXNlcjc3MTg3MDI=", "avatar_url": "https://avatars1.githubusercontent.com/u/7718702?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Codertocat", "html_url": "https://github.com/Codertocat", "followers_url": "https://api.github.com/users/Codertocat/followers", "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", "organizations_url": "https://api.github.com/users/Codertocat/orgs", "repos_url": "https://api.github.com/users/Codertocat/repos", "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", "received_events_url": "https://api.github.com/users/Codertocat/received_events", "type": "User", "site_admin": true }, "html_url": "https://github.com/Codertocat/hello-world", "description": null, "fork": false, "url": "https://api.github.com/repos/Codertocat/hello-world", "forks_url": "https://api.github.com/repos/Codertocat/hello-world/forks", "keys_url": "https://api.github.com/repos/Codertocat/hello-world/keys{/key_id}", "collaborators_url": "https://api.github.com/repos/Codertocat/hello-world/collaborators{/collaborator}", "teams_url": "https://api.github.com/repos/Codertocat/hello-world/teams", "hooks_url": "https://api.github.com/repos/Codertocat/hello-world/hooks", "issue_events_url": "https://api.github.com/repos/Codertocat/hello-world/issues/events{/number}", "events_url": "https://api.github.com/repos/Codertocat/hello-world/events", "assignees_url": "https://api.github.com/repos/Codertocat/hello-world/assignees{/user}", "branches_url": "https://api.github.com/repos/Codertocat/hello-world/branches{/branch}", "tags_url": "https://api.github.com/repos/Codertocat/hello-world/tags", "blobs_url": "https://api.github.com/repos/Codertocat/hello-world/git/blobs{/sha}", "git_tags_url": "https://api.github.com/repos/Codertocat/hello-world/git/tags{/sha}", "git_refs_url": "https://api.github.com/repos/Codertocat/hello-world/git/refs{/sha}", "trees_url": "https://api.github.com/repos/Codertocat/hello-world/git/trees{/sha}", "statuses_url": "https://api.github.com/repos/Codertocat/hello-world/statuses/{sha}", "languages_url": "https://api.github.com/repos/Codertocat/hello-world/languages", "stargazers_url": "https://api.github.com/repos/Codertocat/hello-world/stargazers", "contributors_url": "https://api.github.com/repos/Codertocat/hello-world/contributors", "subscribers_url": "https://api.github.com/repos/Codertocat/hello-world/subscribers", "subscription_url": "https://api.github.com/repos/Codertocat/hello-world/subscription", "commits_url": "https://api.github.com/repos/Codertocat/hello-world/commits{/sha}", "git_commits_url": "https://api.github.com/repos/Codertocat/hello-world/git/commits{/sha}", "comments_url": "https://api.github.com/repos/Codertocat/hello-world/comments{/number}", "issue_comment_url": "https://api.github.com/repos/Codertocat/hello-world/issues/comments{/number}", "contents_url": "https://api.github.com/repos/Codertocat/hello-world/contents/{+path}", "compare_url": "https://api.github.com/repos/Codertocat/hello-world/compare/{base}...{head}", "merges_url": "https://api.github.com/repos/Codertocat/hello-world/merges", "archive_url": "https://api.github.com/repos/Codertocat/hello-world/{archive_format}{/ref}", "downloads_url": "https://api.github.com/repos/Codertocat/hello-world/downloads", "issues_url": "https://api.github.com/repos/Codertocat/hello-world/issues{/number}", "pulls_url": "https://api.github.com/repos/Codertocat/hello-world/pulls{/number}", "milestones_url": "https://api.github.com/repos/Codertocat/hello-world/milestones{/number}", "notifications_url": "https://api.github.com/repos/Codertocat/hello-world/notifications{?since,all,participating}", "labels_url": "https://api.github.com/repos/Codertocat/hello-world/labels{/name}", "releases_url": "https://api.github.com/repos/Codertocat/hello-world/releases{/id}", "deployments_url": "https://api.github.com/repos/Codertocat/hello-world/deployments", "created_at": "2018-08-21T10:58:58Z", "updated_at": "2018-08-21T10:59:01Z", "pushed_at": "2018-08-21T10:59:00Z", "git_url": "git://github.com/Codertocat/hello-world.git", "ssh_url": "git@github.com:Codertocat/hello-world.git", "clone_url": "https://github.com/Codertocat/hello-world.git", "svn_url": "https://github.com/Codertocat/hello-world", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": false, "forks_count": 0, "mirror_url": null, "archived": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "sender": { "login": "Codertocat", "id": 7718702, "node_id": "MDQ6VXNlcjc3MTg3MDI=", "avatar_url": "https://avatars1.githubusercontent.com/u/7718702?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Codertocat", "html_url": "https://github.com/Codertocat", "followers_url": "https://api.github.com/users/Codertocat/followers", "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", "organizations_url": "https://api.github.com/users/Codertocat/orgs", "repos_url": "https://api.github.com/users/Codertocat/repos", "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", "received_events_url": "https://api.github.com/users/Codertocat/received_events", "type": "User", "site_admin": true }, "installation": { "id": 371641, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMzcxNjQx" } } 

create

Git 分支或标签已创建。 更多信息请参阅“Git 数据”REST API。

注:同时推送三个以上的标记时不会收到此事件的 web 挂钩。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the contents permission

Web 挂钩有效负载对象

类型描述
ref字符串The git ref 资源。
ref_type字符串在仓库中创建的 Git ref 对象的类型。 可以是 branchtag
master_branch字符串仓库默认分支的名称(通常是 master)。
说明字符串仓库的当前描述。
pusher_typestring事件的推送器类型。 可以是用户或部署密钥。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "ref": "simple-tag", "ref_type": "tag", "master_branch": "master", "description": null, "pusher_type": "user", "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:15Z", "pushed_at": "2019-05-15T19:38:22Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 1, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 1, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

delete

Git 分支或标签已删除。 更多信息请参阅“Git 数据”REST API。

注:同时删除三个以上的标记时不会收到此事件的 web 挂钩。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the contents permission

Web 挂钩有效负载对象

类型描述
ref字符串The git ref 资源。
ref_type字符串在仓库中删除的 Git ref 对象的类型。 可以是 branchtag
pusher_typestring事件的推送器类型。 可以是用户或部署密钥。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "ref": "simple-tag", "ref_type": "tag", "pusher_type": "user", "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:15Z", "pushed_at": "2019-05-15T19:38:23Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 1, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 1, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

deploy_key

在仓库中添加或删除部署密钥。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“部署密钥”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩

Web 挂钩有效负载对象

类型描述
action字符串执行的操作。 可以是 createddeleted
对象部署密钥资源。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "created", "key": { "id": 100, "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQConScVc7ouWWgwcjneNnJ4PScDkkwEjuDL5leLIUU5aIg13dH55/f4aqKUSvfcLUOKJ0a8073tFqMbR9rfvLAhLGeStKxmYApJXpzVkphauu7kfNW8kQNi1fI4kmHyOpQ+dKtoonzjZAT4L9AV3FlVTOfRq3U8wJ2RPwU+4EtOpMKUF+wcoDJ5ONlKBOW6uAeBt/guBiu6r3awDClDGRo4Q2YCmMceiAyoiuXcr2mFNSyzTqU1f20fftFwucV/VqnxlJjZvZ/zhlfB+v+UgQN11pJJ5vChZ7bzyRtIRRsjxbTReyWxqVZ5hEle5sm1oAR97abW9zTWfwIABgClKo+z", "url": "https://api.github.com/repos/Codertocat/Hello-World/keys/100", "title": "hey-its-a-deploy-key", "verified": true, "created_at": "2019-04-02T17:37:07Z", "read_only": true }, "repository": { "id": 135493233, "node_id": "MDEwOlJlcG9zaXRvcnkxMzU0OTMyMzM=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "owner": { "login": "Codertocat", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Codertocat", "html_url": "https://github.com/Codertocat", "followers_url": "https://api.github.com/users/Codertocat/followers", "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", "organizations_url": "https://api.github.com/users/Codertocat/orgs", "repos_url": "https://api.github.com/users/Codertocat/repos", "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", "received_events_url": "https://api.github.com/users/Codertocat/received_events", "type": "User", "site_admin": false }, "private": false, "html_url": "https://github.com/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://api.github.com/repos/Codertocat/Hello-World", "forks_url": "https://api.github.com/repos/Codertocat/Hello-World/forks", "keys_url": "https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://api.github.com/repos/Codertocat/Hello-World/teams", "hooks_url": "https://api.github.com/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://api.github.com/repos/Codertocat/Hello-World/events", "assignees_url": "https://api.github.com/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://api.github.com/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://api.github.com/repos/Codertocat/Hello-World/tags", "blobs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://api.github.com/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://api.github.com/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://api.github.com/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://api.github.com/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://api.github.com/repos/Codertocat/Hello-World/subscription", "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://api.github.com/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://api.github.com/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://api.github.com/repos/Codertocat/Hello-World/merges", "archive_url": "https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://api.github.com/repos/Codertocat/Hello-World/downloads", "issues_url": "https://api.github.com/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://api.github.com/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://api.github.com/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://api.github.com/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments", "created_at": "2018-05-30T20:18:04Z", "updated_at": "2018-05-30T20:18:50Z", "pushed_at": "2018-05-30T20:18:48Z", "git_url": "git://github.com/Codertocat/Hello-World.git", "ssh_url": "git@github.com:Codertocat/Hello-World.git", "clone_url": "https://github.com/Codertocat/Hello-World.git", "svn_url": "https://github.com/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "open_issues_count": 1, "license": null, "forks": 0, "open_issues": 1, "watchers": 0, "default_branch": "master" }, "sender": { "login": "Codertocat", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Codertocat", "html_url": "https://github.com/Codertocat", "followers_url": "https://api.github.com/users/Codertocat/followers", "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", "organizations_url": "https://api.github.com/users/Codertocat/orgs", "repos_url": "https://api.github.com/users/Codertocat/repos", "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", "received_events_url": "https://api.github.com/users/Codertocat/received_events", "type": "User", "site_admin": false } } 

deployment

已创建部署。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“部署”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the deployments permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作。 可以是 created
deployment对象部署
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "deployment": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments/2", "id": 2, "node_id": "MDEwOkRlcGxveW1lbnQy", "sha": "78a96099c3f442d7f6e8d1a7d07090091993e65a", "ref": "master", "task": "deploy", "payload": {}, "original_environment": "production", "environment": "production", "description": null, "creator": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "created_at": "2019-05-15T19:38:20Z", "updated_at": "2019-05-15T19:38:20Z", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments/2/statuses", "repository_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World" }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:15Z", "pushed_at": "2019-05-15T19:38:19Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 1, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 1, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

deployment_status

已创建部署。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“部署状态”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the deployments permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作。 可以是 created
deployment_status对象部署状态
deployment_status["state"]字符串新状态。 可以是 pendingsuccessfailureerror
deployment_status["target_url"]字符串添加到状态的可选链接。
deployment_status["description"]字符串添加到状态的可选人类可读说明。
deployment对象此状态关联的部署
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "deployment_status": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments/2/statuses/2", "id": 2, "node_id": "MDE2OkRlcGxveW1lbnRTdGF0dXMy", "state": "success", "creator": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "description": "", "environment": "production", "target_url": "", "created_at": "2019-05-15T19:38:21Z", "updated_at": "2019-05-15T19:38:21Z", "deployment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments/2", "repository_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World" }, "deployment": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments/2", "id": 2, "node_id": "MDEwOkRlcGxveW1lbnQy", "sha": "78a96099c3f442d7f6e8d1a7d07090091993e65a", "ref": "master", "task": "deploy", "payload": {}, "original_environment": "production", "environment": "production", "description": null, "creator": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "created_at": "2019-05-15T19:38:20Z", "updated_at": "2019-05-15T19:38:21Z", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments/2/statuses", "repository_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World" }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:15Z", "pushed_at": "2019-05-15T19:38:19Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 1, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 1, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

企业

站点或仓库管理员启用或禁用匿名 Git 读取权限。 更多信息请参阅“允许管理员启用对公共仓库的匿名 Git 读取权限”。 此事件在事件 API 中不可用。

可用性

Web 挂钩有效负载对象

类型描述
action字符串执行的操作。 可以是 anonymous_access_enabledanonymous_access_disabled

Web 挂钩有效负载示例

{ "action": "anonymous_access_enabled", "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://avatars.octocoders.github.io/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": true } } 

复刻

用户复刻仓库。 更多信息请参阅“复刻”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the contents permission

Web 挂钩有效负载对象

类型描述
forkee对象创建的 repository 资源。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "forkee": { "id": 120, "node_id": "MDEwOlJlcG9zaXRvcnkxMjA=", "name": "Hello-World", "full_name": "Octocoders/Hello-World", "private": false, "owner": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Octocoders", "html_url": "https://octocoders.github.io/Octocoders", "followers_url": "https://octocoders.github.io/api/v3/users/Octocoders/followers", "following_url": "https://octocoders.github.io/api/v3/users/Octocoders/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Octocoders/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Octocoders/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Octocoders/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Octocoders/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/users/Octocoders/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Octocoders/received_events", "type": "Organization", "site_admin": false }, "html_url": "https://octocoders.github.io/Octocoders/Hello-World", "description": null, "fork": true, "url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/deployments", "created_at": "2019-05-15T19:38:10Z", "updated_at": "2019-05-15T19:38:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Octocoders/Hello-World.git", "ssh_url": "git@octocoders.github.io:Octocoders/Hello-World.git", "clone_url": "https://octocoders.github.io/Octocoders/Hello-World.git", "svn_url": "https://octocoders.github.io/Octocoders/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": false, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": false, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 0, "license": null, "forks": 0, "open_issues": 0, "watchers": 0, "default_branch": "master", "public": true }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 1, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 1, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Octocoders", "html_url": "https://octocoders.github.io/Octocoders", "followers_url": "https://octocoders.github.io/api/v3/users/Octocoders/followers", "following_url": "https://octocoders.github.io/api/v3/users/Octocoders/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Octocoders/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Octocoders/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Octocoders/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Octocoders/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/users/Octocoders/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Octocoders/received_events", "type": "Organization", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

github_app_authorization

当有人撤销对 GitHub 应用程序 的授权时,将发生此事件。 GitHub 应用程序 默认情况下会接收此 web 挂钩,并且无法取消订阅此事件。

任何人都可以从 GitHub 帐户设置页面撤销他们对 GitHub 应用程序的授权。 撤销对 GitHub 应用程序的授权不会卸载 GitHub 应用程序。 您应该编程 GitHub 应用程序,使其在收到此 web 挂钩后,不再代表已撤销令牌的人调用 API。 如果 GitHub 应用程序继续使用已撤销的访问令牌,它将收到 401 Bad Credentials 错误。 For details about user-to-server requests, which require GitHub 应用程序 authorization, see "Identifying and authorizing users for GitHub 应用程序."

可用性

  • GitHub 应用程序

Web 挂钩有效负载对象

类型描述
action字符串执行的操作。 可以是 revoked
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "revoked", "sender": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false } } 

gollum

创建或更新 wiki 页面。 更多信息请参阅“关于 wikis”。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the contents permission

Web 挂钩有效负载对象

类型描述
页面数组已更新的页面。
pages[][page_name]字符串页面的名称。
pages[][title]字符串当前页面标题。
pages[][action]字符串在页面上执行的操作。 可以是 creatededited
pages[][sha]字符串页面的最新提交 SHA。
pages[][html_url]字符串指向 HTML wiki 页面。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "pages": [ { "page_name": "Home", "title": "Home", "summary": null, "action": "edited", "sha": "4bbb6df16cb5ce1818602bf634e94ebdac7ae385", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/wiki/Home" } ], "repository": { "id": 122, "node_id": "MDEwOlJlcG9zaXRvcnkxMjI=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://avatars.octocoders.github.io/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "private": false, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2018-10-04T18:29:19Z", "updated_at": "2018-10-04T18:29:21Z", "pushed_at": "2018-10-04T18:29:59Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "open_issues_count": 0, "license": null, "forks": 0, "open_issues": 0, "watchers": 0, "default_branch": "master" }, "sender": { "login": "rachmari", "id": 3, "node_id": "MDQ6VXNlcjM=", "avatar_url": "https://avatars.octocoders.github.io/u/3?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/rachmari", "html_url": "https://octocoders.github.io/rachmari", "followers_url": "https://octocoders.github.io/api/v3/users/rachmari/followers", "following_url": "https://octocoders.github.io/api/v3/users/rachmari/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/rachmari/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/rachmari/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/rachmari/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/rachmari/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/rachmari/repos", "events_url": "https://octocoders.github.io/api/v3/users/rachmari/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/rachmari/received_events", "type": "User", "site_admin": true } } 

安装

与 GitHub 应用程序安装相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“GitHub 应用程序安装”REST API。

可用性

  • GitHub 应用程序

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是以下选项之一:
  • created - 有人安装 GitHub 应用程序。
  • deleted - 有人卸载 GitHub 应用程序
  • suspend - 有人挂起 GitHub 应用程序 安装。
  • unsuspend - 有人取消挂起 GitHub 应用程序 安装。
  • new_permissions_accepted - 有人接受 GitHub 应用程序 安装的新权限。 当 GitHub 应用程序 所有者请求新权限时,安装 GitHub 应用程序 的人必须接受新权限请求。
仓库数组安装设施可访问的仓库对象数组。
installationobjectGitHub 应用程序 安装。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "deleted", "installation": { "id": 5, "account": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/avatars/u/4?", "gravatar_id": "", "url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat", "html_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/Codertocat", "followers_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/followers", "following_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/following{/other_user}", "gists_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/subscriptions", "organizations_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/orgs", "repos_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/repos", "events_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "repository_selection": "selected", "access_tokens_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/app/installations/5/access_tokens", "repositories_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/installation/repositories", "html_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/settings/installations/5", "app_id": 2, "target_id": 4, "target_type": "User", "permissions": { "administration": "write", "checks": "write", "contents": "write", "deployments": "write", "issues": "write", "pages": "write", "pull_requests": "write", "repository_hooks": "write", "repository_projects": "write", "statuses": "write", "repository_pre_receive_hooks": "write", "metadata": "read", "vulnerability_alerts": "read" }, "events": [ "check_run", "check_suite", "commit_comment", "create", "delete", "deployment", "deployment_status", "fork", "gollum", "issues", "issue_comment", "label", "member", "membership", "milestone", "organization", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "push", "release", "repository", "status", "team", "team_add", "watch" ], "created_at": "2019-05-15T19:37:38.000Z", "updated_at": "2019-05-15T19:37:38.000Z", "single_file_name": null }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/avatars/b/1?", "description": null, "website_url": null, "html_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/avatars/u/4?", "gravatar_id": "", "url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat", "html_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/Codertocat", "followers_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/followers", "following_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/following{/other_user}", "gists_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/subscriptions", "organizations_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/orgs", "repos_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/repos", "events_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "http://rachmari-0a7d40112fe15292b.ghe-test.net/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false } } 

installation_repositories

与要添加到 GitHub 应用程序安装中的仓库相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“GitHub 应用程序安装”REST API。

可用性

  • GitHub 应用程序

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是 addedremoved
repository_selection字符串安装所在仓库的选择。 可以是 selectedall
repositories_added数组已添加到安装中的仓库对象数组。
repositories_removed数组已从安装中删除的仓库对象数组。
installationobjectGitHub 应用程序 安装。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "added", "installation": { "id": 5, "account": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "repository_selection": "selected", "access_tokens_url": "https://octocoders.github.io/api/v3/app/installations/5/access_tokens", "repositories_url": "https://octocoders.github.io/api/v3/installation/repositories", "html_url": "https://octocoders.github.io/settings/installations/5", "app_id": 2, "target_id": 4, "target_type": "User", "permissions": { "administration": "write", "repository_pre_receive_hooks": "write", "statuses": "write", "repository_projects": "write", "repository_hooks": "write", "pull_requests": "write", "pages": "write", "issues": "write", "deployments": "write", "contents": "write", "checks": "write", "vulnerability_alerts": "read", "metadata": "read" }, "events": [ "check_run", "check_suite", "commit_comment", "create", "delete", "deployment", "deployment_status", "fork", "gollum", "issues", "issue_comment", "label", "member", "membership", "milestone", "organization", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "push", "release", "repository", "status", "team", "team_add", "watch" ], "created_at": 1557949058, "updated_at": 1557949058, "single_file_name": null }, "repository_selection": "selected", "repositories_added": [ { "id": 119, "node_id": "MDEwOlJlcG9zaXRvcnkxMTk=", "name": "Space", "full_name": "Codertocat/Space", "private": false } ], "repositories_removed": [], "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false } } 

issue_comment

与议题或拉取请求评论相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“议题评论”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the issues permission

Web 挂钩有效负载对象

类型描述
action字符串在评论上执行的操作。 可以以下项之一:createdediteddeleted
changesobject对评论的更改,如果操作为 editedchanges[body][from]
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "created", "issue": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1", "repository_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1/labels{/name}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1/comments", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1/events", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/issues/1", "id": 10, "node_id": "MDU6SXNzdWUxMA==", "number": 1, "title": "Spelling error in the README file", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "labels": [ { "id": 941, "node_id": "MDU6TGFiZWw5NDE=", "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels/bug", "name": "bug", "color": "d73a4a", "default": true } ], "state": "open", "locked": false, "assignee": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "assignees": [ { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false } ], "milestone": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones/1", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/milestone/1", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones/1/labels", "id": 2, "node_id": "MDk6TWlsZXN0b25lMg==", "number": 1, "title": "v1.0", "description": "Add new space flight simulator", "creator": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "open_issues": 1, "closed_issues": 0, "state": "closed", "created_at": "2019-05-15T19:37:52Z", "updated_at": "2019-05-15T19:37:53Z", "due_on": "2019-05-23T00:00:00Z", "closed_at": "2019-05-15T19:37:53Z" }, "comments": 0, "created_at": "2019-05-15T19:37:53Z", "updated_at": "2019-05-15T19:37:55Z", "closed_at": null, "author_association": "OWNER", "body": "It looks like you accidently spelled 'commit' with two 't's." }, "comment": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments/2", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/issues/1#issuecomment-2", "issue_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1", "id": 2, "node_id": "MDEyOklzc3VlQ29tbWVudDI=", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "created_at": "2019-05-15T19:37:55Z", "updated_at": "2019-05-15T19:37:55Z", "author_association": "OWNER", "body": "You are totally right! I'll get this fixed right away." }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:37:50Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 1, "license": null, "forks": 0, "open_issues": 1, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

议题

与议题相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“议题”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the issues permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是以下项之一:openedediteddeletedpinnedunpinnedclosedreopenedassignedunassignedlabeledunlabeledlockedunlockedtransferredmilestoneddemilestoned
issueobject议题本身。 changes
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

有人编辑议题时的 web 挂钩示例

{ "action": "edited", "issue": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1", "repository_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1/labels{/name}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1/comments", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/1/events", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/issues/1", "id": 10, "node_id": "MDU6SXNzdWUxMA==", "number": 1, "title": "Spelling error in the README file", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "labels": [ { "id": 941, "node_id": "MDU6TGFiZWw5NDE=", "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels/bug", "name": "bug", "color": "d73a4a", "default": true } ], "state": "open", "locked": false, "assignee": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "assignees": [ { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false } ], "milestone": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones/1", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/milestone/1", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones/1/labels", "id": 2, "node_id": "MDk6TWlsZXN0b25lMg==", "number": 1, "title": "v1.0", "description": "Add new space flight simulator", "creator": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "open_issues": 1, "closed_issues": 0, "state": "closed", "created_at": "2019-05-15T19:37:52Z", "updated_at": "2019-05-15T19:37:53Z", "due_on": "2019-05-23T00:00:00Z", "closed_at": "2019-05-15T19:37:53Z" }, "comments": 0, "created_at": "2019-05-15T19:37:53Z", "updated_at": "2019-05-15T19:37:54Z", "closed_at": null, "author_association": "OWNER", "body": "It looks like you accidently spelled 'commit' with two 't's." }, "changes": {}, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:37:50Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 1, "license": null, "forks": 0, "open_issues": 1, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

标签

与标签相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“标签”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the metadata permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是 createdediteddeleted
标签对象添加的标签。
changes对象对标签的更改(如果操作为 edited)。
changes[name][from]字符串名称的先前版本(如果操作为 edited)。
changes[color][from]字符串颜色的先前版本(如果操作为 edited)。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "deleted", "label": { "id": 965, "node_id": "MDU6TGFiZWw5NjU=", "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels/:bug:%20Bugfix", "name": ":bug: Bugfix", "color": "cceeaa", "default": false }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:25Z", "pushed_at": "2019-05-15T19:38:23Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

成员

与仓库协作者相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“协作者”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the members permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是以下选项之一:
  • added - 用户接受加入仓库的邀请。
  • removed - 用户被删除仓库协作者角色。
  • edited - 用户的协作者权限已更改。
memberobject已添加的用户changes
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "added", "member": { "login": "Hacktocat", "id": 5, "node_id": "MDQ6VXNlcjU=", "avatar_url": "https://octocoders.github.io/avatars/u/5?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Hacktocat", "html_url": "https://octocoders.github.io/Hacktocat", "followers_url": "https://octocoders.github.io/api/v3/users/Hacktocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Hacktocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Hacktocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Hacktocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Hacktocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Hacktocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Hacktocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Hacktocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Hacktocat/received_events", "type": "User", "site_admin": false }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:15Z", "pushed_at": "2019-05-15T19:38:23Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 1, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 1, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

membership

与团队成员相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“团队成员”REST API。

可用性

  • 组织 web 挂钩
  • GitHub 应用程序 with the members permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是 addedremoved
作用域字符串成员的作用域。 目前只能是 team
成员对象已添加或删除的用户
团队对象成员的团队
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "removed", "scope": "team", "member": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "team": { "name": "github", "id": 3, "node_id": "MDQ6VGVhbTM=", "slug": "github", "description": "Open-source team", "privacy": "secret", "url": "https://octocoders.github.io/api/v3/teams/3", "html_url": "https://octocoders.github.io/orgs/Octocoders/teams/github", "members_url": "https://octocoders.github.io/api/v3/teams/3/members{/member}", "repositories_url": "https://octocoders.github.io/api/v3/teams/3/repos", "permission": "pull" }, "organization": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "url": "https://octocoders.github.io/api/v3/orgs/Octocoders", "repos_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/events", "hooks_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/hooks", "issues_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/issues", "members_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/members{/member}", "public_members_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/public_members{/member}", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "description": "" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" } } 

meta

配置此事件的 web 挂钩已被删除。 此事件将仅监听对安装此事件的特定挂钩的更改。 因此,必须为要接收元事件的每个挂钩选择它。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩

Web 挂钩有效负载对象

类型描述
action字符串执行的操作。 可以是 deleted
hook_id整数修改后的 web 挂钩的 ID。
挂钩对象修改后的 web 挂钩。 它将包含基于 web 挂钩类型的不同键:repository、organization、business、app 或 GitHub Marketplace。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "deleted", "hook_id": 101047067, "hook": { "type": "Repository", "id": 101047067, "name": "web", "active": true, "events": [ "meta" ], "config": { "content_type": "json", "insecure_ssl": "0", "url": "http://example.com/hook" }, "updated_at": "2019-04-10T03:57:12Z", "created_at": "2019-04-10T03:57:12Z" }, "repository": { "id": 135493233, "node_id": "MDEwOlJlcG9zaXRvcnkxMzU0OTMyMzM=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "owner": { "login": "Codertocat", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Codertocat", "html_url": "https://github.com/Codertocat", "followers_url": "https://api.github.com/users/Codertocat/followers", "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", "organizations_url": "https://api.github.com/users/Codertocat/orgs", "repos_url": "https://api.github.com/users/Codertocat/repos", "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", "received_events_url": "https://api.github.com/users/Codertocat/received_events", "type": "User", "site_admin": false }, "private": false, "html_url": "https://github.com/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://api.github.com/repos/Codertocat/Hello-World", "forks_url": "https://api.github.com/repos/Codertocat/Hello-World/forks", "keys_url": "https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://api.github.com/repos/Codertocat/Hello-World/teams", "hooks_url": "https://api.github.com/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://api.github.com/repos/Codertocat/Hello-World/events", "assignees_url": "https://api.github.com/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://api.github.com/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://api.github.com/repos/Codertocat/Hello-World/tags", "blobs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://api.github.com/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://api.github.com/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://api.github.com/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://api.github.com/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://api.github.com/repos/Codertocat/Hello-World/subscription", "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://api.github.com/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://api.github.com/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://api.github.com/repos/Codertocat/Hello-World/merges", "archive_url": "https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://api.github.com/repos/Codertocat/Hello-World/downloads", "issues_url": "https://api.github.com/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://api.github.com/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://api.github.com/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://api.github.com/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments", "created_at": "2018-05-30T20:18:04Z", "updated_at": "2018-05-30T20:18:50Z", "pushed_at": "2018-05-30T20:18:48Z", "git_url": "git://github.com/Codertocat/Hello-World.git", "ssh_url": "git@github.com:Codertocat/Hello-World.git", "clone_url": "https://github.com/Codertocat/Hello-World.git", "svn_url": "https://github.com/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "open_issues_count": 1, "license": null, "forks": 0, "open_issues": 1, "watchers": 0, "default_branch": "master" }, "sender": { "login": "Codertocat", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Codertocat", "html_url": "https://github.com/Codertocat", "followers_url": "https://api.github.com/users/Codertocat/followers", "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", "organizations_url": "https://api.github.com/users/Codertocat/orgs", "repos_url": "https://api.github.com/users/Codertocat/repos", "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", "received_events_url": "https://api.github.com/users/Codertocat/received_events", "type": "User", "site_admin": false } } 

里程碑

与里程碑相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“里程碑”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the pull_requests permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是以下项之一:createdclosedopenedediteddeleted
里程碑对象里程碑本身。
changes对象对里程碑的更改,如果操作为 edited
changes[description][from]字符串说明的先前版本(如果操作为 edited)。
changes[due_on][from]字符串到期日期的先前版本,如果操作为 edited
changes[title][from]字符串标题的先前版本,如果操作为 edited
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "created", "milestone": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones/1", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/milestone/1", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones/1/labels", "id": 2, "node_id": "MDk6TWlsZXN0b25lMg==", "number": 1, "title": "v1.0", "description": "Add new space flight simulator", "creator": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "open_issues": 0, "closed_issues": 0, "state": "open", "created_at": "2019-05-15T19:37:52Z", "updated_at": "2019-05-15T19:37:52Z", "due_on": "2019-05-23T00:00:00Z", "closed_at": null }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:37:50Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 0, "license": null, "forks": 0, "open_issues": 0, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

组织

与组织及其成员相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“组织”REST API。

可用性

  • GitHub Enterprise web 挂钩只接收 createddeleted 事件。 更多信息请参阅“全局 web 挂钩”。
  • 组织 web 挂钩只接收 deletedaddedremovedrenamedinvited 事件
  • GitHub 应用程序 with the members permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是以下选项之一:createddeletedrenamedmember_addedmember_removedmember_invited
邀请对象对用户的邀请或电子邮件邀请(如果操作为 member_invited)。
membership对象用户和组织之间的成员资格。 当操作为 member_invited 时不存在。
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "member_added", "membership": { "url": "https://octocoders.github.io/api/v3/orgs/Octocoders/memberships/Hacktocat", "state": "active", "role": "member", "organization_url": "https://octocoders.github.io/api/v3/orgs/Octocoders", "user": { "login": "Hacktocat", "id": 5, "node_id": "MDQ6VXNlcjU=", "avatar_url": "https://octocoders.github.io/avatars/u/5?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Hacktocat", "html_url": "https://octocoders.github.io/Hacktocat", "followers_url": "https://octocoders.github.io/api/v3/users/Hacktocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Hacktocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Hacktocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Hacktocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Hacktocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Hacktocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Hacktocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Hacktocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Hacktocat/received_events", "type": "User", "site_admin": false } }, "organization": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "url": "https://octocoders.github.io/api/v3/orgs/Octocoders", "repos_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/events", "hooks_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/hooks", "issues_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/issues", "members_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/members{/member}", "public_members_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/public_members{/member}", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "description": "" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false } } 

page_build

表示尝试构建一个 GitHub Pages 站点,无论是否成功。 向 GitHub Pages 启用的分支(项目页面的 gh-pages、用户和组织页面的默认分支)的推送将触发此事件。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the pages permission

Web 挂钩有效负载对象

类型描述
id整数页面构建的唯一标识符。
构建对象列表 GitHub Pages 构建本身。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "id": 7, "build": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pages/builds/7", "status": "built", "error": { "message": null }, "pusher": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "commit": "3648135c2986115284ae152d90459473b15fd19c", "duration": 6917, "created_at": "2019-05-15T19:38:15Z", "updated_at": "2019-05-15T19:38:22Z" }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:15Z", "pushed_at": "2019-05-15T19:38:19Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 1, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 1, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

ping

当您创建新的 web 挂钩时,我们将向您发送一个简单的 ping 事件,让您知道您已正确设置 web 挂钩。 此事件不会存储,因此无法通过事件 API 端点检索它。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 receive a ping event with an app_id used to register the app

Web 挂钩有效负载对象

类型描述
zen字符串GitHub zen 的随机字符串。
hook_id整数触发 ping 的 web 挂钩的 ID。
挂钩对象web 挂钩配置
hook[app_id]整数注册新的 GitHub 应用程序 时,GitHub Enterprise Server 将 ping 事件发送到您在注册过程中指定的 web 挂钩 URL。 该事件包含 app_id,这是验证应用程序的必需项。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "zen": "Non-blocking is better than blocking.", "hook_id": 30, "hook": { "type": "Repository", "id": 30, "name": "web", "active": true, "events": [ "*" ], "config": { "content_type": "json", "url": "https://smee.io/YEbF2t8kjvPAn7Ck", "insecure_ssl": "0" }, "updated_at": "2019-05-15T19:38:17Z", "created_at": "2019-05-15T19:38:17Z", "url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/hooks/30", "test_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/hooks/30/test", "ping_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/hooks/30/pings", "last_response": { "code": null, "status": "unused", "message": null } }, "repository": { "id": 120, "node_id": "MDEwOlJlcG9zaXRvcnkxMjA=", "name": "Hello-World", "full_name": "Octocoders/Hello-World", "private": false, "owner": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Octocoders", "html_url": "https://octocoders.github.io/Octocoders", "followers_url": "https://octocoders.github.io/api/v3/users/Octocoders/followers", "following_url": "https://octocoders.github.io/api/v3/users/Octocoders/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Octocoders/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Octocoders/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Octocoders/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Octocoders/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/users/Octocoders/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Octocoders/received_events", "type": "Organization", "site_admin": false }, "html_url": "https://octocoders.github.io/Octocoders/Hello-World", "description": null, "fork": true, "url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/deployments", "created_at": "2019-05-15T19:38:10Z", "updated_at": "2019-05-15T19:38:14Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Octocoders/Hello-World.git", "ssh_url": "git@octocoders.github.io:Octocoders/Hello-World.git", "clone_url": "https://octocoders.github.io/Octocoders/Hello-World.git", "svn_url": "https://octocoders.github.io/Octocoders/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": false, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": false, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 0, "license": null, "forks": 0, "open_issues": 0, "watchers": 0, "default_branch": "master" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false } } 

project_card

与项目卡有关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“项目卡”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the repository_projects or organization_projects permission

Web 挂钩有效负载对象

类型描述
action字符串在项目卡上执行的操作。 可以是 creatededitedmovedconverteddeleted
changes对象对项目卡的更改,如果操作为 editedconverted
changes[note][from]字符串备注的先前版本,如果操作为 editedconverted
after_id整数此卡现在所遵循的卡的 ID,如果操作为 "moved"。 将为 null,如果它是列中的第一张卡。
project_card对象项目卡本身。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "created", "project_card": { "url": "https://octocoders.github.io/api/v3/projects/columns/cards/8", "project_url": "https://octocoders.github.io/api/v3/projects/6", "column_url": "https://octocoders.github.io/api/v3/projects/columns/8", "column_id": 8, "id": 8, "node_id": "MDExOlByb2plY3RDYXJkOA==", "note": "Work that can be completed in one hour or less.", "archived": false, "creator": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "created_at": "2019-05-15T19:39:01Z", "updated_at": "2019-05-15T19:39:01Z" }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:27Z", "pushed_at": "2019-05-15T19:38:23Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false } } 

project_column

与项目板中的列相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“项目列”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the repository_projects or organization_projects permission

Web 挂钩有效负载对象

类型描述
action字符串在项目列上执行的操作。 可以以下项之一:creatededitedmoveddeleted
changes对象对项目列的更改,如果操作为 edited
changes[name][from]字符串名称的先前版本(如果操作为 edited)。
after_id整数此列现在所遵循的列的 ID,如果操作为 "moved"。 将为 null,如果它是项目中的第一列。
project_column对象项目列本身。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "created", "project_column": { "url": "https://octocoders.github.io/api/v3/projects/columns/8", "project_url": "https://octocoders.github.io/api/v3/projects/6", "cards_url": "https://octocoders.github.io/api/v3/projects/columns/8/cards", "id": 8, "node_id": "MDEzOlByb2plY3RDb2x1bW44", "name": "Small bugfixes", "created_at": "2019-05-15T19:39:01Z", "updated_at": "2019-05-15T19:39:01Z" }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:27Z", "pushed_at": "2019-05-15T19:38:23Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

project

与项目板有关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“项目”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the repository_projects or organization_projects permission

Web 挂钩有效负载对象

类型描述
action字符串在项目上执行的操作。 可以是以下项之一:creatededitedclosedreopeneddeleted
changes对象对项目的更改,如果操作为 edited
changes[name][from]字符串名称的先前版本(如果操作为 edited)。
changes[body][from]字符串正文的先前版本,如果操作为 edited
project对象项目本身。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "created", "project": { "owner_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "url": "https://octocoders.github.io/api/v3/projects/6", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/projects/1", "columns_url": "https://octocoders.github.io/api/v3/projects/6/columns", "id": 6, "node_id": "MDc6UHJvamVjdDY=", "name": "Space 2.0", "body": "Project tasks for a trip to Space", "number": 1, "state": "open", "creator": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "created_at": "2019-05-15T19:38:27Z", "updated_at": "2019-05-15T19:38:27Z" }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:27Z", "pushed_at": "2019-05-15T19:38:23Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

public

当私有仓库公开时。 毫无疑问:最好的 GitHub Enterprise Server 事件。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the metadata permission

Web 挂钩有效负载对象

类型描述
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:25Z", "pushed_at": "2019-05-15T19:38:23Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

pull_request

与拉取请求相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“拉取请求”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the pull_requests permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是以下选项之一:
  • assigned
  • closed:如果操作为 closed,并且 merged 键为 false,则拉取请求随未合并的提交而关闭。 如果操作为 closed,并且 merged 键为 true,则拉取请求被合并。
  • converted_to_draft
  • edited
  • labeled
  • locked
  • opened
  • ready_for_review
  • reopened
  • review_request_removed
  • review_requested
  • synchronize: Triggered when a pull request's head branch is updated. For example, when the head branch is updated from the base branch, when new commits are pushed to the head branch, or when the base branch is changed.
  • unassigned
  • unlabeled
  • unlocked
numberinteger拉取请求编号。 changes
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

review_requestedreview_request_removed 事件的递送将含有一个额外的字段,称为 requested_reviewer

{ "action": "opened", "number": 2, "pull_request": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2", "id": 2, "node_id": "MDExOlB1bGxSZXF1ZXN0Mg==", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2", "diff_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2.diff", "patch_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2.patch", "issue_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2", "number": 2, "state": "open", "locked": false, "title": "Update the README with new information.", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "body": "This is a pretty simple change that we need to pull into master.", "created_at": "2019-05-15T19:38:02Z", "updated_at": "2019-05-15T19:38:02Z", "closed_at": null, "merged_at": null, "merge_commit_sha": null, "assignee": null, "assignees": [], "requested_reviewers": [], "requested_teams": [], "labels": [], "milestone": null, "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/commits", "review_comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/comments", "review_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/comments{/number}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2/comments", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/14977a7b5485400124827221a04bfb474bcd72d1", "head": { "label": "Codertocat:changes", "ref": "changes", "sha": "14977a7b5485400124827221a04bfb474bcd72d1", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "repo": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" } }, "base": { "label": "Codertocat:master", "ref": "master", "sha": "78a96099c3f442d7f6e8d1a7d07090091993e65a", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "repo": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" } }, "_links": { "self": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2" }, "html": { "href": "https://octocoders.github.io/Codertocat/Hello-World/pull/2" }, "issue": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2" }, "comments": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2/comments" }, "review_comments": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/comments" }, "review_comment": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/comments{/number}" }, "commits": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/commits" }, "statuses": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/14977a7b5485400124827221a04bfb474bcd72d1" } }, "author_association": "OWNER", "draft": false, "merged": false, "mergeable": null, "rebaseable": null, "mergeable_state": "unknown", "merged_by": null, "comments": 0, "review_comments": 0, "maintainer_can_modify": false, "commits": 1, "additions": 1, "deletions": 1, "changed_files": 1 }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

pull_request_review

与拉取请求审查相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“拉取请求审查”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the pull_requests permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是以下选项之一:
  • submitted - 拉取请求审查被提交为非挂起状态。
  • edited - 审查的正文被编辑。
  • dismissed - 审查被驳回。
pull_request对象与审查相关的拉取请求
审查对象受影响的审查。
changes[body][from]字符串正文的先前版本,如果操作为 edited
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "submitted", "review": { "id": 2, "node_id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3Mg==", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "body": null, "commit_id": "14977a7b5485400124827221a04bfb474bcd72d1", "submitted_at": "2019-05-15T19:38:08Z", "state": "commented", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2#pullrequestreview-2", "pull_request_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2", "author_association": "OWNER", "_links": { "html": { "href": "https://octocoders.github.io/Codertocat/Hello-World/pull/2#pullrequestreview-2" }, "pull_request": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2" } } }, "pull_request": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2", "id": 2, "node_id": "MDExOlB1bGxSZXF1ZXN0Mg==", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2", "diff_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2.diff", "patch_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2.patch", "issue_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2", "number": 2, "state": "open", "locked": false, "title": "Update the README with new information.", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "body": "This is a pretty simple change that we need to pull into master.", "created_at": "2019-05-15T19:38:02Z", "updated_at": "2019-05-15T19:38:08Z", "closed_at": null, "merged_at": null, "merge_commit_sha": "e67e14475991deeb61cc1999c3bf9db333ac0d5f", "assignee": null, "assignees": [], "requested_reviewers": [], "requested_teams": [], "labels": [], "milestone": null, "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/commits", "review_comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/comments", "review_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/comments{/number}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2/comments", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/14977a7b5485400124827221a04bfb474bcd72d1", "head": { "label": "Codertocat:changes", "ref": "changes", "sha": "14977a7b5485400124827221a04bfb474bcd72d1", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "repo": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" } }, "base": { "label": "Codertocat:master", "ref": "master", "sha": "78a96099c3f442d7f6e8d1a7d07090091993e65a", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "repo": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" } }, "_links": { "self": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2" }, "html": { "href": "https://octocoders.github.io/Codertocat/Hello-World/pull/2" }, "issue": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2" }, "comments": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2/comments" }, "review_comments": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/comments" }, "review_comment": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/comments{/number}" }, "commits": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/commits" }, "statuses": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/14977a7b5485400124827221a04bfb474bcd72d1" } }, "author_association": "OWNER" }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

pull_request_review_comment

与拉取请求统一差异中的拉取请求审查评论相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“拉取请求审查评论”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the pull_requests permission

Web 挂钩有效负载对象

类型描述
action字符串在评论上执行的操作。 可以以下项之一:createdediteddeleted
changesobject对评论的更改,如果操作为 editedchanges[body][from]
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "created", "comment": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/comments/2", "pull_request_review_id": 2, "id": 2, "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI=", "diff_hunk": "@@ -1 +1 @@\n-# Hello-World", "path": "README.md", "position": 1, "original_position": 1, "commit_id": "14977a7b5485400124827221a04bfb474bcd72d1", "original_commit_id": "14977a7b5485400124827221a04bfb474bcd72d1", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "body": "Maybe you should use more emoji on this line.", "created_at": "2019-05-15T19:38:07Z", "updated_at": "2019-05-15T19:38:08Z", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2#discussion_r2", "pull_request_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2", "author_association": "OWNER", "_links": { "self": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/comments/2" }, "html": { "href": "https://octocoders.github.io/Codertocat/Hello-World/pull/2#discussion_r2" }, "pull_request": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2" } } }, "pull_request": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2", "id": 2, "node_id": "MDExOlB1bGxSZXF1ZXN0Mg==", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2", "diff_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2.diff", "patch_url": "https://octocoders.github.io/Codertocat/Hello-World/pull/2.patch", "issue_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2", "number": 2, "state": "open", "locked": false, "title": "Update the README with new information.", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "body": "This is a pretty simple change that we need to pull into master.", "created_at": "2019-05-15T19:38:02Z", "updated_at": "2019-05-15T19:38:08Z", "closed_at": null, "merged_at": null, "merge_commit_sha": "e67e14475991deeb61cc1999c3bf9db333ac0d5f", "assignee": null, "assignees": [], "requested_reviewers": [], "requested_teams": [], "labels": [], "milestone": null, "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/commits", "review_comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/comments", "review_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/comments{/number}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2/comments", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/14977a7b5485400124827221a04bfb474bcd72d1", "head": { "label": "Codertocat:changes", "ref": "changes", "sha": "14977a7b5485400124827221a04bfb474bcd72d1", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "repo": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" } }, "base": { "label": "Codertocat:master", "ref": "master", "sha": "78a96099c3f442d7f6e8d1a7d07090091993e65a", "user": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "repo": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" } }, "_links": { "self": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2" }, "html": { "href": "https://octocoders.github.io/Codertocat/Hello-World/pull/2" }, "issue": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2" }, "comments": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/2/comments" }, "review_comments": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/comments" }, "review_comment": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/comments{/number}" }, "commits": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls/2/commits" }, "statuses": { "href": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/14977a7b5485400124827221a04bfb474bcd72d1" } }, "author_association": "OWNER" }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:37:10Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

推送

一个或多个提交被推送到仓库分支或标记。

注:同时推送三个以上的标记时不会收到此事件的 web 挂钩。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the contents permission

Web 挂钩有效负载对象

类型描述
ref字符串被推送的完整 git ref。 Example: refs/heads/main or refs/tags/v3.14.1.
before字符串推送之前在 ref 上最近提交的 SHA。
after字符串推送之后在 ref 上最近提交的 SHA。
created布尔值Whether this push created the ref.
deleted布尔值Whether this push deleted the ref.
forced布尔值Whether this push was a force push of the ref.
head_commit对象For pushes where after is or points to a commit object, an expanded representation of that commit. For pushes where after refers to an annotated tag object, an expanded representation of the commit pointed to by the annotated tag.
compare字符串URL that shows the changes in this ref update, from the before commit to the after commit. For a newly created ref that is directly based on the default branch, this is the comparison between the head of the default branch and the after commit. Otherwise, this shows all commits until the after commit.
commits数组描述所推送提交的提交对象数组。 (Pushed commits are all commits that are included in the compare between the before commit and the after commit.) The array includes a maximum of 20 commits. 如有必要,可使用提交 API 获取更多提交。 This limit is applied to timeline events only and isn't applied to webhook deliveries.
commits[][id]字符串提交的 SHA。
commits[][timestamp]字符串提交的 ISO 8601 时间戳。
commits[][message]字符串提交消息.
commits[][author]对象提交的 Git 作者。
commits[][author][name]字符串Git 作者的名称。
commits[][author][email]字符串Git 作者的电子邮件地址。
commits[][url]url指向提交 API 资源的 URL。
commits[][distinct]布尔值此提交是否与之前推送的任何提交不同。
commits[][added]数组在提交中添加的文件数组。
commits[][modified]数组由提交修改的文件数组。
commits[][removed]数组在提交中删除的文件数组。
pusher对象推送提交的用户。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "ref": "refs/tags/simple-tag", "before": "4544205a385319fd846d5df4ed2e3b8173529d78", "after": "0000000000000000000000000000000000000000", "created": false, "deleted": true, "forced": false, "base_ref": null, "compare": "https://octocoders.github.io/Codertocat/Hello-World/compare/4544205a3853...000000000000", "commits": [], "head_commit": null, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "name": "Codertocat", "email": "Codertocat@Octocoders.io", "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": 1557949027, "updated_at": "2019-05-15T19:38:15Z", "pushed_at": 1557949103, "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 1, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 1, "open_issues": 2, "watchers": 0, "default_branch": "master", "stargazers": 0, "master_branch": "master" }, "pusher": { "name": "Codertocat", "email": "Codertocat@Octocoders.io" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

发行版

与发行版相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“发行版”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the contents permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是以下选项之一:
  • published:发行版、预发行版或发行版草稿已发布
  • unpublished:发行版或预发行版已删除
  • created:草稿已保存,或者此前未保存为草稿的发行版或预发行版已发布
  • edited:发行版、预发行版或发行版草稿被编辑
  • deleted:发行版、预发行版或发行版草稿被删除
  • prereleased:预发行版已创建
  • released:发行版或发行版草稿已发布,或者预发行版被更改为发行版
changes[body][from]string正文的前版本,如果操作为 editedchanges[name][from]
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "published", "release": { "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases/2", "assets_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases/2/assets", "upload_url": "https://octocoders.github.io/api/uploads/repos/Codertocat/Hello-World/releases/2/assets{?name,label}", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/releases/tag/0.0.1", "id": 2, "node_id": "MDc6UmVsZWFzZTI=", "tag_name": "0.0.1", "target_commitish": "master", "name": null, "draft": false, "author": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "prerelease": false, "created_at": "2019-05-15T19:37:08Z", "published_at": "2019-05-15T19:38:20Z", "assets": [], "tarball_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tarball/0.0.1", "zipball_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/zipball/0.0.1", "body": null }, "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:15Z", "pushed_at": "2019-05-15T19:38:19Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 1, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 1, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

repository_dispatch

当 GitHub 应用程序 将 POST 请求发送到“创建仓库分发事件”端点时,此事件发生。

可用性

  • GitHub 应用程序 must have the contents permission to receive this webhook.

Web 挂钩有效负载示例

{ "action": "on-demand-test", "branch": "master", "client_payload": { "unit": false, "integration": true }, "repository": { "id": 17273051, "node_id": "MDEwOlJlcG9zaXRvcnkxNzI3MzA1MQ==", "name": "octo-repo", "full_name": "octo-org/octo-repo", "private": true, "owner": { "login": "octo-org", "id": 6811672, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=", "avatar_url": "https://avatars3.githubusercontent.com/u/6811672?v=4", "gravatar_id": "", "url": "https://api.github.com/users/octo-org", "html_url": "https://github.com/octo-org", "followers_url": "https://api.github.com/users/octo-org/followers", "following_url": "https://api.github.com/users/octo-org/following{/other_user}", "gists_url": "https://api.github.com/users/octo-org/gists{/gist_id}", "starred_url": "https://api.github.com/users/octo-org/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octo-org/subscriptions", "organizations_url": "https://api.github.com/users/octo-org/orgs", "repos_url": "https://api.github.com/users/octo-org/repos", "events_url": "https://api.github.com/users/octo-org/events{/privacy}", "received_events_url": "https://api.github.com/users/octo-org/received_events", "type": "Organization", "site_admin": false }, "html_url": "https://github.com/octo-org/octo-repo", "description": "My first repo on GitHub!", "fork": false, "url": "https://api.github.com/repos/octo-org/octo-repo", "forks_url": "https://api.github.com/repos/octo-org/octo-repo/forks", "keys_url": "https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}", "collaborators_url": "https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}", "teams_url": "https://api.github.com/repos/octo-org/octo-repo/teams", "hooks_url": "https://api.github.com/repos/octo-org/octo-repo/hooks", "issue_events_url": "https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}", "events_url": "https://api.github.com/repos/octo-org/octo-repo/events", "assignees_url": "https://api.github.com/repos/octo-org/octo-repo/assignees{/user}", "branches_url": "https://api.github.com/repos/octo-org/octo-repo/branches{/branch}", "tags_url": "https://api.github.com/repos/octo-org/octo-repo/tags", "blobs_url": "https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}", "git_tags_url": "https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}", "git_refs_url": "https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}", "trees_url": "https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}", "statuses_url": "https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}", "languages_url": "https://api.github.com/repos/octo-org/octo-repo/languages", "stargazers_url": "https://api.github.com/repos/octo-org/octo-repo/stargazers", "contributors_url": "https://api.github.com/repos/octo-org/octo-repo/contributors", "subscribers_url": "https://api.github.com/repos/octo-org/octo-repo/subscribers", "subscription_url": "https://api.github.com/repos/octo-org/octo-repo/subscription", "commits_url": "https://api.github.com/repos/octo-org/octo-repo/commits{/sha}", "git_commits_url": "https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}", "comments_url": "https://api.github.com/repos/octo-org/octo-repo/comments{/number}", "issue_comment_url": "https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}", "contents_url": "https://api.github.com/repos/octo-org/octo-repo/contents/{+path}", "compare_url": "https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}", "merges_url": "https://api.github.com/repos/octo-org/octo-repo/merges", "archive_url": "https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}", "downloads_url": "https://api.github.com/repos/octo-org/octo-repo/downloads", "issues_url": "https://api.github.com/repos/octo-org/octo-repo/issues{/number}", "pulls_url": "https://api.github.com/repos/octo-org/octo-repo/pulls{/number}", "milestones_url": "https://api.github.com/repos/octo-org/octo-repo/milestones{/number}", "notifications_url": "https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}", "labels_url": "https://api.github.com/repos/octo-org/octo-repo/labels{/name}", "releases_url": "https://api.github.com/repos/octo-org/octo-repo/releases{/id}", "deployments_url": "https://api.github.com/repos/octo-org/octo-repo/deployments", "created_at": "2014-02-28T02:42:51Z", "updated_at": "2018-10-10T15:58:51Z", "pushed_at": "2018-10-10T15:58:47Z", "git_url": "git://github.com/octo-org/octo-repo.git", "ssh_url": "git@github.com:octo-org/octo-repo.git", "clone_url": "https://github.com/octo-org/octo-repo.git", "svn_url": "https://github.com/octo-org/octo-repo", "homepage": "", "size": 59, "stargazers_count": 0, "watchers_count": 0, "language": "JavaScript", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": false, "forks_count": 1, "mirror_url": null, "archived": false, "open_issues_count": 23, "license": null, "forks": 1, "open_issues": 23, "watchers": 0, "default_branch": "master" }, "organization": { "login": "octo-org", "id": 6811672, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=", "url": "https://api.github.com/orgs/octo-org", "repos_url": "https://api.github.com/orgs/octo-org/repos", "events_url": "https://api.github.com/orgs/octo-org/events", "hooks_url": "https://api.github.com/orgs/octo-org/hooks", "issues_url": "https://api.github.com/orgs/octo-org/issues", "members_url": "https://api.github.com/orgs/octo-org/members{/member}", "public_members_url": "https://api.github.com/orgs/octo-org/public_members{/member}", "avatar_url": "https://avatars3.githubusercontent.com/u/6811672?v=4", "description": "Working better together!" }, "sender": { "login": "Codertocat", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Codertocat", "html_url": "https://github.com/Codertocat", "followers_url": "https://api.github.com/users/Codertocat/followers", "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", "organizations_url": "https://api.github.com/users/Codertocat/orgs", "repos_url": "https://api.github.com/users/Codertocat/repos", "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", "received_events_url": "https://api.github.com/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 375706, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMzc1NzA2" } } 

仓库

与仓库相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“仓库”REST API。

可用性

  • 仓库 web 挂钩接收除 deleted 之外的所有事件类型
  • 组织 web 挂钩
  • GitHub 应用程序 with the metadata permission receive all event types except deleted

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是以下选项之一:
  • created - 创建了仓库。
  • deleted - 仓库被删除。
  • archived - 仓库被存档。
  • unarchived - 仓库被取消存档。
  • anonymous_access_enabled - 仓库被启用匿名 Git 访问, anonymous_access_disabled - 仓库被禁用匿名 Git 访问
  • edited - 仓库的信息被编辑。
  • renamed - 仓库被重命名。
  • transferred - 仓库被转让。
  • publicized - 仓库被设为公共。
  • privatized - 仓库被设为私有。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "publicized", "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:25Z", "pushed_at": "2019-05-15T19:38:23Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

security_advisory

与安全通告相关的活动。 安全通告提供有关 GitHub 软件中安全漏洞的信息。 安全通告数据集还支持 GitHub 安全警报,请参阅“关于漏洞依赖项的警报”。

可用性

  • GitHub 应用程序 with the security_events permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 对于所有新事件,该操作可以是 publishedupdatedperformedwithdrawn 之一。
security_advisory对象安全通告的详细信息,包括摘要、说明和严重程度。

Web 挂钩有效负载示例

{ "action": "published", "security_advisory": { "ghsa_id": "GHSA-rf4j-j272-fj86", "summary": "Moderate severity vulnerability that affects django", "description": "django.contrib.auth.forms.AuthenticationForm in Django 2.0 before 2.0.2, and 1.11.8 and 1.11.9, allows remote attackers to obtain potentially sensitive information by leveraging data exposure from the confirm_login_allowed() method, as demonstrated by discovering whether a user account is inactive.", "severity": "moderate", "identifiers": [ { "value": "GHSA-rf4j-j272-fj86", "type": "GHSA" }, { "value": "CVE-2018-6188", "type": "CVE" } ], "references": [ { "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-6188" } ], "published_at": "2018-10-03T21:13:54Z", "updated_at": "2018-10-03T21:13:54Z", "withdrawn_at": null, "vulnerabilities": [ { "package": { "ecosystem": "pip", "name": "django" }, "severity": "moderate", "vulnerable_version_range": ">= 2.0.0, < 2.0.2", "first_patched_version": { "identifier": "2.0.2" } }, { "package": { "ecosystem": "pip", "name": "django" }, "severity": "moderate", "vulnerable_version_range": ">= 1.11.8, < 1.11.10", "first_patched_version": { "identifier": "1.11.10" } } ] } } 

星标

与标星仓库相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“星标”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩

Web 挂钩有效负载对象

类型描述
action字符串执行的操作。 可以是 createddeleted
starred_at字符串星标创建的时间。 这是 ISO 8601 格式的时间戳:YYYY-MM-DDTHH:MM:SSZ。 对于 deleted 操作将是 null
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "created", "starred_at": "2019-05-15T15:20:40Z", "repository": { "id": 186853002, "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Codertocat", "html_url": "https://github.com/Codertocat", "followers_url": "https://api.github.com/users/Codertocat/followers", "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", "organizations_url": "https://api.github.com/users/Codertocat/orgs", "repos_url": "https://api.github.com/users/Codertocat/repos", "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", "received_events_url": "https://api.github.com/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://github.com/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://api.github.com/repos/Codertocat/Hello-World", "forks_url": "https://api.github.com/repos/Codertocat/Hello-World/forks", "keys_url": "https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://api.github.com/repos/Codertocat/Hello-World/teams", "hooks_url": "https://api.github.com/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://api.github.com/repos/Codertocat/Hello-World/events", "assignees_url": "https://api.github.com/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://api.github.com/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://api.github.com/repos/Codertocat/Hello-World/tags", "blobs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://api.github.com/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://api.github.com/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://api.github.com/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://api.github.com/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://api.github.com/repos/Codertocat/Hello-World/subscription", "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://api.github.com/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://api.github.com/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://api.github.com/repos/Codertocat/Hello-World/merges", "archive_url": "https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://api.github.com/repos/Codertocat/Hello-World/downloads", "issues_url": "https://api.github.com/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://api.github.com/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://api.github.com/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://api.github.com/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T15:19:25Z", "updated_at": "2019-05-15T15:20:40Z", "pushed_at": "2019-05-15T15:20:33Z", "git_url": "git://github.com/Codertocat/Hello-World.git", "ssh_url": "git@github.com:Codertocat/Hello-World.git", "clone_url": "https://github.com/Codertocat/Hello-World.git", "svn_url": "https://github.com/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 1, "watchers_count": 1, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 1, "default_branch": "master" }, "sender": { "login": "Codertocat", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Codertocat", "html_url": "https://github.com/Codertocat", "followers_url": "https://api.github.com/users/Codertocat/followers", "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", "organizations_url": "https://api.github.com/users/Codertocat/orgs", "repos_url": "https://api.github.com/users/Codertocat/repos", "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", "received_events_url": "https://api.github.com/users/Codertocat/received_events", "type": "User", "site_admin": false } } 

状态

当 Git 提交的状态发生更改时。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“状态”REST API。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the statuses permission

Web 挂钩有效负载对象

类型描述
id整数状态的唯一标识符。
sha字符串提交 SHA。
state字符串新状态。 可以是 pendingsuccessfailureerror
说明字符串添加到状态的可选人类可读说明。
target_url字符串添加到状态的可选链接。
分支数组包含状态的 SHA 的分支对象数组。 每个分支都包含给定的 SHA,但 SHA 不一定是该分支的头部。 该数组最多包含 10 个分支。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "id": 2, "sha": "4544205a385319fd846d5df4ed2e3b8173529d78", "name": "Codertocat/Hello-World", "target_url": null, "context": "default", "description": null, "state": "success", "commit": { "sha": "4544205a385319fd846d5df4ed2e3b8173529d78", "node_id": "MDY6Q29tbWl0MTE4OjQ1NDQyMDVhMzg1MzE5ZmQ4NDZkNWRmNGVkMmUzYjgxNzM1MjlkNzg=", "commit": { "author": { "name": "Codertocat", "email": "Codertocat@Octocoders.io", "date": "2019-05-15T19:37:08Z" }, "committer": { "name": "GitHub Enterprise", "email": "noreply@octocoders.github.io", "date": "2019-05-15T19:37:08Z" }, "message": "Initial commit", "tree": { "sha": "1b13fc88733f95cc8cb16170f6990ef30d78acf4", "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees/1b13fc88733f95cc8cb16170f6990ef30d78acf4" }, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits/4544205a385319fd846d5df4ed2e3b8173529d78", "comment_count": 1, "verification": { "verified": false, "reason": "unsigned", "signature": null, "payload": null } }, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits/4544205a385319fd846d5df4ed2e3b8173529d78", "html_url": "https://octocoders.github.io/Codertocat/Hello-World/commit/4544205a385319fd846d5df4ed2e3b8173529d78", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits/4544205a385319fd846d5df4ed2e3b8173529d78/comments", "author": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "committer": null, "parents": [] }, "branches": [ { "name": "master", "commit": { "sha": "78a96099c3f442d7f6e8d1a7d07090091993e65a", "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits/78a96099c3f442d7f6e8d1a7d07090091993e65a" }, "protected": false }, { "name": "changes", "commit": { "sha": "14977a7b5485400124827221a04bfb474bcd72d1", "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits/14977a7b5485400124827221a04bfb474bcd72d1" }, "protected": false }, { "name": "gh-pages", "commit": { "sha": "3648135c2986115284ae152d90459473b15fd19c", "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits/3648135c2986115284ae152d90459473b15fd19c" }, "protected": false } ], "created_at": "2019-05-15T19:38:21+00:00", "updated_at": "2019-05-15T19:38:21+00:00", "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:15Z", "pushed_at": "2019-05-15T19:38:19Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 1, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 1, "open_issues": 2, "watchers": 0, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

团队

与组织的团队相关的活动。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“团队”REST API。

可用性

  • 组织 web 挂钩
  • GitHub 应用程序 with the members permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 可以是 createddeletededitedadded_to_repositoryremoved_from_repository 之一。
团队对象团队本身。
changes对象对团队的更改(如果操作为 edited)。
changes[description][from]字符串说明的先前版本(如果操作为 edited)。
changes[name][from]字符串名称的先前版本(如果操作为 edited)。
changes[privacy][from]字符串团队隐私的先前版本(如果操作为 edited)。
changes[repository][permissions][from][admin]布尔值团队成员对仓库 admin 权限的先前版本(如果操作为 edited)。
changes[repository][permissions][from][pull]布尔值团队成员对仓库 pull 权限的先前版本(如果操作为 edited)。
changes[repository][permissions][from][push]布尔值团队成员对仓库 push 权限的先前版本(如果操作为 edited)。
仓库对象在团队权限范围中添加或删除的仓库(如果操作为 added_to_repositoryremoved_from_repositoryedited)。 对于 edited 操作,repository 还包含团队对仓库的新权限级别。
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "added_to_repository", "team": { "name": "github", "id": 3, "node_id": "MDQ6VGVhbTM=", "slug": "github", "description": "Open-source team", "privacy": "secret", "url": "https://octocoders.github.io/api/v3/teams/3", "html_url": "https://octocoders.github.io/orgs/Octocoders/teams/github", "members_url": "https://octocoders.github.io/api/v3/teams/3/members{/member}", "repositories_url": "https://octocoders.github.io/api/v3/teams/3/repos", "permission": "pull" }, "repository": { "id": 120, "node_id": "MDEwOlJlcG9zaXRvcnkxMjA=", "name": "Hello-World", "full_name": "Octocoders/Hello-World", "private": false, "owner": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Octocoders", "html_url": "https://octocoders.github.io/Octocoders", "followers_url": "https://octocoders.github.io/api/v3/users/Octocoders/followers", "following_url": "https://octocoders.github.io/api/v3/users/Octocoders/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Octocoders/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Octocoders/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Octocoders/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Octocoders/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/users/Octocoders/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Octocoders/received_events", "type": "Organization", "site_admin": false }, "html_url": "https://octocoders.github.io/Octocoders/Hello-World", "description": null, "fork": true, "url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/deployments", "created_at": "2019-05-15T19:38:10Z", "updated_at": "2019-05-15T19:38:14Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Octocoders/Hello-World.git", "ssh_url": "git@octocoders.github.io:Octocoders/Hello-World.git", "clone_url": "https://octocoders.github.io/Octocoders/Hello-World.git", "svn_url": "https://octocoders.github.io/Octocoders/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": false, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": false, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 0, "license": null, "forks": 0, "open_issues": 0, "watchers": 0, "default_branch": "master", "permissions": { "pull": true, "push": false, "admin": false } }, "organization": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "url": "https://octocoders.github.io/api/v3/orgs/Octocoders", "repos_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/events", "hooks_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/hooks", "issues_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/issues", "members_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/members{/member}", "public_members_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/public_members{/member}", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "description": "" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false } } 

team_add

仓库被添加到团队时。

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the members permission

Web 挂钩有效负载对象

类型描述
团队对象被修改的团队注:较旧的事件可能不会在有效负载中包括此值。
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "team": { "name": "github", "id": 3, "node_id": "MDQ6VGVhbTM=", "slug": "github", "description": "Open-source team", "privacy": "secret", "url": "https://octocoders.github.io/api/v3/teams/3", "html_url": "https://octocoders.github.io/orgs/Octocoders/teams/github", "members_url": "https://octocoders.github.io/api/v3/teams/3/members{/member}", "repositories_url": "https://octocoders.github.io/api/v3/teams/3/repos", "permission": "pull" }, "repository": { "id": 120, "node_id": "MDEwOlJlcG9zaXRvcnkxMjA=", "name": "Hello-World", "full_name": "Octocoders/Hello-World", "private": false, "owner": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Octocoders", "html_url": "https://octocoders.github.io/Octocoders", "followers_url": "https://octocoders.github.io/api/v3/users/Octocoders/followers", "following_url": "https://octocoders.github.io/api/v3/users/Octocoders/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Octocoders/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Octocoders/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Octocoders/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Octocoders/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/users/Octocoders/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Octocoders/received_events", "type": "Organization", "site_admin": false }, "html_url": "https://octocoders.github.io/Octocoders/Hello-World", "description": null, "fork": true, "url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Octocoders/Hello-World/deployments", "created_at": "2019-05-15T19:38:10Z", "updated_at": "2019-05-15T19:38:14Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Octocoders/Hello-World.git", "ssh_url": "git@octocoders.github.io:Octocoders/Hello-World.git", "clone_url": "https://octocoders.github.io/Octocoders/Hello-World.git", "svn_url": "https://octocoders.github.io/Octocoders/Hello-World", "homepage": null, "size": 0, "stargazers_count": 0, "watchers_count": 0, "language": "Ruby", "has_issues": false, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": false, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 0, "license": null, "forks": 0, "open_issues": 0, "watchers": 0, "default_branch": "master" }, "organization": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "url": "https://octocoders.github.io/api/v3/orgs/Octocoders", "repos_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/events", "hooks_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/hooks", "issues_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/issues", "members_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/members{/member}", "public_members_url": "https://octocoders.github.io/api/v3/orgs/Octocoders/public_members{/member}", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "description": "" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Octocoders", "id": 6, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=", "avatar_url": "https://octocoders.github.io/avatars/u/6?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Octocoders", "html_url": "https://octocoders.github.io/Octocoders", "followers_url": "https://octocoders.github.io/api/v3/users/Octocoders/followers", "following_url": "https://octocoders.github.io/api/v3/users/Octocoders/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Octocoders/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Octocoders/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Octocoders/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Octocoders/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Octocoders/repos", "events_url": "https://octocoders.github.io/api/v3/users/Octocoders/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Octocoders/received_events", "type": "Organization", "site_admin": false } } 

用户

当用户被 createddeleted 时。

可用性

Web 挂钩有效负载示例

{ "user": { "login": "Snowtocat", "id": 16, "node_id": "MDQ6VXNlcjE2", "avatar_url": "https://octocoders.github.io/avatars/u/16?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Snowtocat", "html_url": "https://octocoders.github.io/Snowtocat", "followers_url": "https://octocoders.github.io/api/v3/users/Snowtocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Snowtocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Snowtocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Snowtocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Snowtocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Snowtocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Snowtocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Snowtocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Snowtocat/received_events", "type": "User", "site_admin": false }, "action": "created", "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Snowtocat", "id": 16, "node_id": "MDQ6VXNlcjE2", "avatar_url": "https://octocoders.github.io/avatars/u/16?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Snowtocat", "html_url": "https://octocoders.github.io/Snowtocat", "followers_url": "https://octocoders.github.io/api/v3/users/Snowtocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Snowtocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Snowtocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Snowtocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Snowtocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Snowtocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Snowtocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Snowtocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Snowtocat/received_events", "type": "User", "site_admin": false } } 

查看

当有人标星仓库时。 活动类型在有效负载对象的 action 属性中指定。 更多信息请参阅“星标”REST API。

事件的执行者是标星仓库的用户,并且事件的仓库是被标星的仓库

可用性

  • 仓库 web 挂钩
  • 组织 web 挂钩
  • GitHub 应用程序 with the metadata permission

Web 挂钩有效负载对象

类型描述
action字符串执行的操作内容. 目前只能是 started
repositoryobject事件发生所在的 repository
organizationobject当为组织配置了 web 挂钩或事件是由于组织所拥有仓库中的活动而发生时,web 挂钩有效负载包含 organization 对象。
installationobjectGitHub 应用程序 安装。 当事件被配置并发送到 GitHub 应用程序 时,web 挂钩有效负载包含 installation 属性。
senderobject触发事件的用户。

Web 挂钩有效负载示例

{ "action": "started", "repository": { "id": 118, "node_id": "MDEwOlJlcG9zaXRvcnkxMTg=", "name": "Hello-World", "full_name": "Codertocat/Hello-World", "private": false, "owner": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "html_url": "https://octocoders.github.io/Codertocat/Hello-World", "description": null, "fork": false, "url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World", "forks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/forks", "keys_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/keys{/key_id}", "collaborators_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/collaborators{/collaborator}", "teams_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/teams", "hooks_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/hooks", "issue_events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/events{/number}", "events_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/events", "assignees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/assignees{/user}", "branches_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/branches{/branch}", "tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/tags", "blobs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/blobs{/sha}", "git_tags_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/tags{/sha}", "git_refs_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/refs{/sha}", "trees_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/trees{/sha}", "statuses_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/statuses/{sha}", "languages_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/languages", "stargazers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/stargazers", "contributors_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contributors", "subscribers_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscribers", "subscription_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/subscription", "commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/commits{/sha}", "git_commits_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/git/commits{/sha}", "comments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/comments{/number}", "issue_comment_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues/comments{/number}", "contents_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/contents/{+path}", "compare_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/compare/{base}...{head}", "merges_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/merges", "archive_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/{archive_format}{/ref}", "downloads_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/downloads", "issues_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/issues{/number}", "pulls_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/pulls{/number}", "milestones_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/milestones{/number}", "notifications_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/notifications{?since,all,participating}", "labels_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/labels{/name}", "releases_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/releases{/id}", "deployments_url": "https://octocoders.github.io/api/v3/repos/Codertocat/Hello-World/deployments", "created_at": "2019-05-15T19:37:07Z", "updated_at": "2019-05-15T19:38:09Z", "pushed_at": "2019-05-15T19:38:03Z", "git_url": "git://octocoders.github.io/Codertocat/Hello-World.git", "ssh_url": "git@octocoders.github.io:Codertocat/Hello-World.git", "clone_url": "https://octocoders.github.io/Codertocat/Hello-World.git", "svn_url": "https://octocoders.github.io/Codertocat/Hello-World", "homepage": null, "size": 0, "stargazers_count": 1, "watchers_count": 1, "language": null, "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": true, "forks_count": 0, "mirror_url": null, "archived": false, "disabled": false, "open_issues_count": 2, "license": null, "forks": 0, "open_issues": 2, "watchers": 1, "default_branch": "master" }, "enterprise": { "id": 1, "slug": "github", "name": "GitHub", "node_id": "MDg6QnVzaW5lc3Mx", "avatar_url": "https://octocoders.github.io/avatars/b/1?", "description": null, "website_url": null, "html_url": "https://octocoders.github.io/businesses/github", "created_at": "2019-05-14T19:31:12Z", "updated_at": "2019-05-14T19:31:12Z" }, "sender": { "login": "Codertocat", "id": 4, "node_id": "MDQ6VXNlcjQ=", "avatar_url": "https://octocoders.github.io/avatars/u/4?", "gravatar_id": "", "url": "https://octocoders.github.io/api/v3/users/Codertocat", "html_url": "https://octocoders.github.io/Codertocat", "followers_url": "https://octocoders.github.io/api/v3/users/Codertocat/followers", "following_url": "https://octocoders.github.io/api/v3/users/Codertocat/following{/other_user}", "gists_url": "https://octocoders.github.io/api/v3/users/Codertocat/gists{/gist_id}", "starred_url": "https://octocoders.github.io/api/v3/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://octocoders.github.io/api/v3/users/Codertocat/subscriptions", "organizations_url": "https://octocoders.github.io/api/v3/users/Codertocat/orgs", "repos_url": "https://octocoders.github.io/api/v3/users/Codertocat/repos", "events_url": "https://octocoders.github.io/api/v3/users/Codertocat/events{/privacy}", "received_events_url": "https://octocoders.github.io/api/v3/users/Codertocat/received_events", "type": "User", "site_admin": false }, "installation": { "id": 5, "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNQ==" } } 

workflow_dispatch

当有人触发 GitHub 上的工作流程运行或将 POST 请求发送到“创建工作流程分发事件”端点时,此事件发生。 更多信息请参阅“触发工作流程的事件”。

可用性

  • GitHub 应用程序 must have the contents permission to receive this webhook.

Web 挂钩有效负载示例

{ "inputs": { "name": "Mona the Octocat" }, "ref": "refs/heads/master", "repository": { "id": 17273051, "node_id": "MDEwOlJlcG9zaXRvcnkxNzI3MzA1MQ==", "name": "octo-repo", "full_name": "octo-org/octo-repo", "private": true, "owner": { "login": "octo-org", "id": 6811672, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=", "avatar_url": "https://avatars3.githubusercontent.com/u/6811672?v=4", "gravatar_id": "", "url": "https://api.github.com/users/octo-org", "html_url": "https://github.com/octo-org", "followers_url": "https://api.github.com/users/octo-org/followers", "following_url": "https://api.github.com/users/octo-org/following{/other_user}", "gists_url": "https://api.github.com/users/octo-org/gists{/gist_id}", "starred_url": "https://api.github.com/users/octo-org/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octo-org/subscriptions", "organizations_url": "https://api.github.com/users/octo-org/orgs", "repos_url": "https://api.github.com/users/octo-org/repos", "events_url": "https://api.github.com/users/octo-org/events{/privacy}", "received_events_url": "https://api.github.com/users/octo-org/received_events", "type": "Organization", "site_admin": false }, "html_url": "https://github.com/octo-org/octo-repo", "description": "My first repo on GitHub!", "fork": false, "url": "https://api.github.com/repos/octo-org/octo-repo", "forks_url": "https://api.github.com/repos/octo-org/octo-repo/forks", "keys_url": "https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}", "collaborators_url": "https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}", "teams_url": "https://api.github.com/repos/octo-org/octo-repo/teams", "hooks_url": "https://api.github.com/repos/octo-org/octo-repo/hooks", "issue_events_url": "https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}", "events_url": "https://api.github.com/repos/octo-org/octo-repo/events", "assignees_url": "https://api.github.com/repos/octo-org/octo-repo/assignees{/user}", "branches_url": "https://api.github.com/repos/octo-org/octo-repo/branches{/branch}", "tags_url": "https://api.github.com/repos/octo-org/octo-repo/tags", "blobs_url": "https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}", "git_tags_url": "https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}", "git_refs_url": "https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}", "trees_url": "https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}", "statuses_url": "https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}", "languages_url": "https://api.github.com/repos/octo-org/octo-repo/languages", "stargazers_url": "https://api.github.com/repos/octo-org/octo-repo/stargazers", "contributors_url": "https://api.github.com/repos/octo-org/octo-repo/contributors", "subscribers_url": "https://api.github.com/repos/octo-org/octo-repo/subscribers", "subscription_url": "https://api.github.com/repos/octo-org/octo-repo/subscription", "commits_url": "https://api.github.com/repos/octo-org/octo-repo/commits{/sha}", "git_commits_url": "https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}", "comments_url": "https://api.github.com/repos/octo-org/octo-repo/comments{/number}", "issue_comment_url": "https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}", "contents_url": "https://api.github.com/repos/octo-org/octo-repo/contents/{+path}", "compare_url": "https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}", "merges_url": "https://api.github.com/repos/octo-org/octo-repo/merges", "archive_url": "https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}", "downloads_url": "https://api.github.com/repos/octo-org/octo-repo/downloads", "issues_url": "https://api.github.com/repos/octo-org/octo-repo/issues{/number}", "pulls_url": "https://api.github.com/repos/octo-org/octo-repo/pulls{/number}", "milestones_url": "https://api.github.com/repos/octo-org/octo-repo/milestones{/number}", "notifications_url": "https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}", "labels_url": "https://api.github.com/repos/octo-org/octo-repo/labels{/name}", "releases_url": "https://api.github.com/repos/octo-org/octo-repo/releases{/id}", "deployments_url": "https://api.github.com/repos/octo-org/octo-repo/deployments", "created_at": "2014-02-28T02:42:51Z", "updated_at": "2018-10-10T15:58:51Z", "pushed_at": "2018-10-10T15:58:47Z", "git_url": "git://github.com/octo-org/octo-repo.git", "ssh_url": "git@github.com:octo-org/octo-repo.git", "clone_url": "https://github.com/octo-org/octo-repo.git", "svn_url": "https://github.com/octo-org/octo-repo", "homepage": "", "size": 59, "stargazers_count": 0, "watchers_count": 0, "language": "JavaScript", "has_issues": true, "has_projects": true, "has_downloads": true, "has_wiki": true, "has_pages": false, "forks_count": 1, "mirror_url": null, "archived": false, "open_issues_count": 23, "license": null, "forks": 1, "open_issues": 23, "watchers": 0, "default_branch": "master" }, "organization": { "login": "octo-org", "id": 6811672, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=", "url": "https://api.github.com/orgs/octo-org", "repos_url": "https://api.github.com/orgs/octo-org/repos", "events_url": "https://api.github.com/orgs/octo-org/events", "hooks_url": "https://api.github.com/orgs/octo-org/hooks", "issues_url": "https://api.github.com/orgs/octo-org/issues", "members_url": "https://api.github.com/orgs/octo-org/members{/member}", "public_members_url": "https://api.github.com/orgs/octo-org/public_members{/member}", "avatar_url": "https://avatars3.githubusercontent.com/u/6811672?v=4", "description": "Working better together!" }, "sender": { "login": "Codertocat", "id": 21031067, "node_id": "MDQ6VXNlcjIxMDMxMDY3", "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Codertocat", "html_url": "https://github.com/Codertocat", "followers_url": "https://api.github.com/users/Codertocat/followers", "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", "organizations_url": "https://api.github.com/users/Codertocat/orgs", "repos_url": "https://api.github.com/users/Codertocat/repos", "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", "received_events_url": "https://api.github.com/users/Codertocat/received_events", "type": "User", "site_admin": false }, "workflow": ".github/workflows/hello-world-workflow.yml" }