-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for
deployment_review
event (#816)
- Loading branch information
Showing
7 changed files
with
2,890 additions
and
1,556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
434 changes: 434 additions & 0 deletions
434
payload-examples/api.github.com/deployment_review/requested.payload.json
Large diffs are not rendered by default.
Oops, something went wrong.
442 changes: 442 additions & 0 deletions
442
payload-examples/api.github.com/index.json
Large diffs are not rendered by default.
Oops, something went wrong.
114 changes: 114 additions & 0 deletions
114
payload-schemas/api.github.com/deployment_review/approved.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
114
payload-schemas/api.github.com/deployment_review/rejected.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
90 changes: 90 additions & 0 deletions
90
payload-schemas/api.github.com/deployment_review/requested.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
Oops, something went wrong.