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

This document describes how to convert into a CloudEvents. GitLab webhook event documentation: https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#events Each section below describes how to determine the CloudEvents attributes based on the specified event. | CloudEvents Attribute | Value | | :-- | : | | `id` | Generate a new unique value, e.g. a UUID | | `source` | "repository.homepage" value | | `specversion` | `1.0` | | `type` | `com.gitlab.push` | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "checkout_sha" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | Generate a new unique value, e.g. a UUID | | `source` | "repository.homepage" value | | `specversion` | `1.0` | | `type` | `com.gitlab.tag_push` | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "ref" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | Generate a new unique value, e.g. a UUID | | `source` | "repository.homepage" value | | `specversion` | `1.0` | | `type` | `com.gitlab.issue.` + "object_attributes.state" value | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "object_attributes.iid" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | Generate a new unique value, e.g. a UUID | | `source` | "commit.url" value | | `specversion` | `1.0` | | `type` | `com.gitlab.note.commit` | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "object_attributes.id" value | | `time` | "objectattributes.createdat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | Generate a new unique value, e.g. a UUID | | `source` | "objectattributes.url" value, without the `#note\...` part | | `specversion` | `1.0` | | `type` | `com.gitlab.note.merge_request` | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "object_attributes.id" value | | `time` | "objectattributes.createdat` value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | Generate a new unique value, e.g. a UUID | | `source` |

value without the `#note\...` part | | `specversion` | `1.0` | | `type` | `com.gitlab.note.issue` | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "object_attributes.id" value | | `time` | "objectattributes.createdat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | Generate a new unique value, e.g. a UUID | | `source` | "objectattributes.url" value without the `#note\...` part | | `specversion` | `1.0` | | `type` | `com.gitlab.note.snippet` | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "object_attributes.id" value | | `time` | "objectattributes.createdat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :- | | `id` | Generate a new unique value, e.g. a UUID | | `source` | "repository.homepage" value | | `specversion` | `1.0` | | `type` | `com.gitlab.mergerequest.` + "objectattributes.action" value | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "object_attributes.iid" value | | `time` | "objectattributes.createdat" value | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | Generate a new unique value, e.g. a UUID | | `source` | "project.web_url" value | | `specversion` | `1.0` | | `type` | `com.gitlab.wikipage.` + "objectattributes.action" value | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "object_attributes.slug" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | :-- | | `id` | Generate a new unique value, e.g. a UUID | | `source` | "project.web_url" value | | `specversion` | `1.0` | | `type` | `com.gitlab.pipeline.` + "object_attributes.status" value | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "object_attributes.id" value | | `time` | Current time | | `data` | Content of HTTP request body | | CloudEvents Attribute | Value | | :-- | : | | `id` | Generate a new unique value, e.g. a UUID | | `source` | "repository.homepage" value | | `specversion` | `1.0` | | `type` | `com.gitlab.job.` + "job_status" value | | `datacontenttype` | `application/json` | | `dataschema` | Omit | | `subject` | "job_id" value | | `time` | Current time | | `data` | Content of HTTP request body |