Project: CloudEvents (App Definition and Development / Streaming & Messaging)
File: github.md

This document describes how to convert into a CloudEvents. GitHub webhook event documentation: https://developer.github.com/v3/activity/events/types/ Each section below describes how to determine the CloudEvents attributes based on the specified event. | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.check_run.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "check_run.id" value | | `time` | "checkrun.completedat" value, unless "null", then "checkrun.startedat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.check_suite.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "check_suite.id" value | | `time` | "checksuite.updatedat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "comment.url" value + `/` + "comment.commit_id" value | | `specversion` | `1.0` | | `type` | `com.github.commit_comment.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "comment.id" value | | `time` | "comment.updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.content_reference.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "content_reference.id" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.create.` + "ref_type" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "ref" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.delete.` + "ref_type" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "ref" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.deploy_key.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "key.id" value | | `time` | "key.deletedat" value, unless null then

value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.deployment` | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "deployment.id" value # task? | | `time` | "deployment.updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "deployment.url" value | | `specversion` | `1.0` | | `type` | `com.github.deploymentstatus.` + "deploymentstatus.state" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "deployment_status.url" value | | `time` | "deploymentstatus.updatedat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.fork` | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "forkee.url" value | | `time` | "forkee.created_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "sender.url" value | | `specversion` | `1.0` | | `type` | `com.github.githubappauthorization` | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | Omit | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.gollum.` + "pages.action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "pages.page_name" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "installation.account.url" value | | `specversion` | `1.0` | | `type` | `com.github.installation.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "installation.id" value | | `time` | "installation.updated_at" value # not a timestamp?? | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "installation.account.url" value | | `specversion` | `1.0` | | `type` | `com.github.installation_repository.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "installation.id" value | | `time` | "installation.updated_at" value # not a timestamp?? | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` |

value | | `specversion` | `1.0` | | `type` | `com.github.issue_comment.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "comment.id" value | | `time` | "comment.updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.issue.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "issue.number" value | | `time` | "issue.updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.label.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "label.name" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "sender.url" value without the `/username` portion | | `specversion` | `1.0` | | `type` | `com.github.marketplace_purchase.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "marketplace_purchase.account.login" value | | `time` | "effective_date" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.member.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "member.login" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "team.url" value | | `specversion` | `1.0` | | `type` | `com.github.membership.` + "scope" value + `.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "member.login" value ### or `id` ? | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.meta.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "hook_id" value | | `time` | "hook.updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` |

+ "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "milestone.number" value | | `time` | "milestone.updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "organization.url" value | | `specversion` | `1.0` | | `type` | `com.github.organization.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "membership.user.login" value when available | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "organization.url" value | | `specversion` | `1.0` | | `type` | `com.github.org_block.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "blocked_user.login" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.page_build` | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "build.url" value | | `time` | "pusher.updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.project_card.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "project_card.id" value | | `time` | "projectcard.updatedat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.project_column.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "project_column.id" value | | `time` | "projectcolumn.updatedat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.project.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "project.id" value | | `time` | "project.updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.owner.url" value | | `specversion` | `1.0` | | `type` | `com.github.public` | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "repository.name" value | | `time` |

value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.pull_request.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "number" value | | `time` | "pullrequest.updatedat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "pull_request.url" value | | `specversion` | `1.0` | | `type` | `com.github.pullrequestreview.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "review.id" value | | `time` | "review.submitted_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "pull_request.url" value | | `specversion` | `1.0` | | `type` | `com.github.pullrequestreview_comment.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "comment.id" value | | `time` | "pullrequest.updatedat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.push` | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "ref" value | | `time` | Current time # repository.updated_at ?? | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.registry_package.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "registrypackage.htmlurl" value | | `time` | "registrypackage.updatedat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.release.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "release.id" value | | `time` | "release.\*\_at" value based on action | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.owner.url" value | | `specversion` | `1.0` | | `type` | `com.github.repository.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "repository.name" value | | `time` | "repository.updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.owner.url" value | | `specversion` | `1.0` | | `type` |

| | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "repository.name" value | | `time` | "repository.updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.repositoryvulnerabilityalert.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "alert.id" value | | `time` | Current time # repository.updated_id ? | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | `github.com` | | `specversion` | `1.0` | | `type` | `com.github.security_advisory.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "securityadvisory.ghsaid" value | | `time` | "securityadvisory.updatedat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.star.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | Omit | | `time` | "starred_at" value, if present otherwise Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.status.` # + "state" value ? | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "sha" value | | `time` | "updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.team.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "team.id" value | | `time` | "updated_at" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.team_add.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "team.id" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | "X-GitHub-Delivery" HTTP header value | | `source` | "repository.url" value | | `specversion` | `1.0` | | `type` | `com.github.watch.` + "action" value | | `datacontentencoding` | Omit | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | Omit | | `time` | Current time | | `data` | Content of HTTP request body |