Skip to content

Commit

Permalink
feat: add support for deployment_review event (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Aug 10, 2023
1 parent 56f688f commit 4e36ca2
Show file tree
Hide file tree
Showing 7 changed files with 2,890 additions and 1,556 deletions.
21 changes: 21 additions & 0 deletions cache/api.github.com/webhook-events-and-payloads.html
Expand Up @@ -106,6 +106,15 @@ <h2 id="in-this-article">In this article</h2>
</a>
</li>
</div>
<div>
<li aria-labelledby="react-aria-999 ">
<a href="#deployment_review">
<div data-component="ActionList.Item--DividerContainer">
<span id="react-aria-999">deployment_review</span>
</div>
</a>
</li>
</div>
<div>
<li aria-labelledby="react-aria-384 ">
<a href="#deployment_status">
Expand Down Expand Up @@ -4076,6 +4085,18 @@ <h3 id="webhook-payload-example-9">
}
</code></pre>
</div>
<h2 id="deployment_review">
<a aria-hidden="" tabindex="-1" href="#deployment_review"><svg aria-hidden="" role="img" viewBox="0 0 16 16"
width="16" height="16" fill="currentColor" style="
display: inline-block;
user-select: none;
vertical-align: middle;
">
<path fill-rule="evenodd"
d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z">
</path>
</svg></a>deployment_review
</h2>
<h2 id="deployment_status">
<a aria-hidden="" tabindex="-1" href="#deployment_status"><svg aria-hidden="" role="img" viewBox="0 0 16 16"
width="16" height="16" fill="currentColor" style="
Expand Down

Large diffs are not rendered by default.

442 changes: 442 additions & 0 deletions payload-examples/api.github.com/index.json

Large diffs are not rendered by default.

114 changes: 114 additions & 0 deletions payload-schemas/api.github.com/deployment_review/approved.schema.json
@@ -0,0 +1,114 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "deployment_review$approved",
"type": "object",
"required": [
"action",
"workflow_run",
"since",
"repository",
"organization",
"sender"
],
"properties": {
"action": { "type": "string", "enum": ["approved"] },
"workflow_run": { "$ref": "common/workflow-run.schema.json" },
"since": { "type": "string", "format": "date-time" },
"workflow_job_run": {
"type": "object",
"required": [
"id",
"name",
"status",
"conclusion",
"html_url",
"created_at",
"updated_at",
"environment"
],
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"status": {
"type": "string",
"enum": ["queued", "in_progress", "completed", "waiting"]
},
"conclusion": {
"type": ["string", "null"],
"enum": ["success", "failure", "cancelled", "skipped", null]
},
"html_url": { "type": "string", "format": "uri" },
"created_at": { "type": "string", "format": "date-time" },
"updated_at": { "type": "string", "format": "date-time" },
"environment": { "type": "string" }
},
"additionalProperties": false
},
"workflow_job_runs": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"status",
"conclusion",
"html_url",
"created_at",
"updated_at",
"environment"
],
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"status": {
"type": "string",
"enum": ["queued", "in_progress", "completed", "waiting"]
},
"conclusion": {
"type": ["string", "null"],
"enum": ["success", "failure", "cancelled", "skipped", null]
},
"html_url": { "type": "string", "format": "uri" },
"created_at": { "type": "string", "format": "date-time" },
"updated_at": { "type": "string", "format": "date-time" },
"environment": { "type": "string" }
},
"additionalProperties": false
}
},
"reviewers": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": ["type", "reviewer"],
"properties": {
"type": { "type": "string", "enum": ["User"] },
"reviewer": { "$ref": "common/user.schema.json" }
},
"additionalProperties": false
},
{
"type": "object",
"required": ["type", "reviewer"],
"properties": {
"type": { "type": "string", "enum": ["Team"] },
"reviewer": { "$ref": "common/team.schema.json" }
},
"additionalProperties": false
}
]
}
},
"approver": { "$ref": "common/user.schema.json" },
"comment": { "type": "string" },
"repository": { "$ref": "common/repository.schema.json" },
"organization": { "$ref": "common/organization.schema.json" },
"sender": { "$ref": "common/user.schema.json" },
"installation": { "$ref": "common/installation-lite.schema.json" }
},
"additionalProperties": false,
"title": "deployment_review approved event"
}
114 changes: 114 additions & 0 deletions payload-schemas/api.github.com/deployment_review/rejected.schema.json
@@ -0,0 +1,114 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "deployment_review$rejected",
"type": "object",
"required": [
"action",
"workflow_run",
"since",
"repository",
"organization",
"sender"
],
"properties": {
"action": { "type": "string", "enum": ["rejected"] },
"workflow_run": { "$ref": "common/workflow-run.schema.json" },
"since": { "type": "string", "format": "date-time" },
"workflow_job_run": {
"type": "object",
"required": [
"id",
"name",
"status",
"conclusion",
"html_url",
"created_at",
"updated_at",
"environment"
],
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"status": {
"type": "string",
"enum": ["queued", "in_progress", "completed", "waiting"]
},
"conclusion": {
"type": ["string", "null"],
"enum": ["success", "failure", "cancelled", "skipped", null]
},
"html_url": { "type": "string", "format": "uri" },
"created_at": { "type": "string", "format": "date-time" },
"updated_at": { "type": "string", "format": "date-time" },
"environment": { "type": "string" }
},
"additionalProperties": false
},
"workflow_job_runs": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"status",
"conclusion",
"html_url",
"created_at",
"updated_at",
"environment"
],
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"status": {
"type": "string",
"enum": ["queued", "in_progress", "completed", "waiting"]
},
"conclusion": {
"type": ["string", "null"],
"enum": ["success", "failure", "cancelled", "skipped", null]
},
"html_url": { "type": "string", "format": "uri" },
"created_at": { "type": "string", "format": "date-time" },
"updated_at": { "type": "string", "format": "date-time" },
"environment": { "type": "string" }
},
"additionalProperties": false
}
},
"reviewers": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": ["type", "reviewer"],
"properties": {
"type": { "type": "string", "enum": ["User"] },
"reviewer": { "$ref": "common/user.schema.json" }
},
"additionalProperties": false
},
{
"type": "object",
"required": ["type", "reviewer"],
"properties": {
"type": { "type": "string", "enum": ["Team"] },
"reviewer": { "$ref": "common/team.schema.json" }
},
"additionalProperties": false
}
]
}
},
"approver": { "$ref": "common/user.schema.json" },
"comment": { "type": "string" },
"repository": { "$ref": "common/repository.schema.json" },
"organization": { "$ref": "common/organization.schema.json" },
"sender": { "$ref": "common/user.schema.json" },
"installation": { "$ref": "common/installation-lite.schema.json" }
},
"additionalProperties": false,
"title": "deployment_review rejected event"
}
@@ -0,0 +1,90 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "deployment_review$requested",
"type": "object",
"required": [
"action",
"environment",
"workflow_run",
"since",
"workflow_job_run",
"reviewers",
"requestor",
"repository",
"organization",
"sender"
],
"properties": {
"action": { "type": "string", "enum": ["requested"] },
"workflow_run": {
"oneOf": [
{ "$ref": "common/workflow-run.schema.json" },
{ "type": "null" }
]
},
"since": { "type": "string", "format": "date-time" },
"workflow_job_run": {
"type": "object",
"required": [
"id",
"name",
"status",
"conclusion",
"html_url",
"created_at",
"updated_at",
"environment"
],
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"status": {
"type": "string",
"enum": ["queued", "in_progress", "completed", "waiting"]
},
"conclusion": {
"type": ["string", "null"],
"enum": ["success", "failure", "cancelled", "skipped", null]
},
"html_url": { "type": "string", "format": "uri" },
"created_at": { "type": "string", "format": "date-time" },
"updated_at": { "type": "string", "format": "date-time" },
"environment": { "type": "string" }
},
"additionalProperties": false
},
"environment": { "type": "string" },
"reviewers": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": ["type", "reviewer"],
"properties": {
"type": { "type": "string", "enum": ["User"] },
"reviewer": { "$ref": "common/user.schema.json" }
},
"additionalProperties": false
},
{
"type": "object",
"required": ["type", "reviewer"],
"properties": {
"type": { "type": "string", "enum": ["Team"] },
"reviewer": { "$ref": "common/team.schema.json" }
},
"additionalProperties": false
}
]
}
},
"requestor": { "$ref": "common/user.schema.json" },
"repository": { "$ref": "common/repository.schema.json" },
"organization": { "$ref": "common/organization.schema.json" },
"sender": { "$ref": "common/user.schema.json" },
"installation": { "$ref": "common/installation-lite.schema.json" }
},
"additionalProperties": false,
"title": "deployment_review requested event"
}

0 comments on commit 4e36ca2

Please sign in to comment.