Skip to content

Commit

Permalink
refactor: use a common schema for CheckRunEvent#check_run.pull_request (
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 authored Feb 24, 2021
1 parent a5ff2fd commit 64b2be3
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 495 deletions.
62 changes: 2 additions & 60 deletions payload-schemas/schemas/check_run/completed.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,36 +125,7 @@
"after": { "type": ["string", "null"] },
"pull_requests": {
"type": "array",
"items": {
"type": "object",
"required": ["url", "id", "number", "head", "base"],
"properties": {
"url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"number": { "type": "integer" },
"head": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
"items": { "$ref": "common/check-run-pull-request.schema.json" }
},
"app": { "$ref": "common/app.schema.json" },
"created_at": { "type": "string", "format": "date-time" },
Expand All @@ -165,36 +136,7 @@
"app": { "$ref": "common/app.schema.json" },
"pull_requests": {
"type": "array",
"items": {
"type": "object",
"required": ["url", "id", "number", "head", "base"],
"properties": {
"url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"number": { "type": "integer" },
"head": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
"items": { "$ref": "common/check-run-pull-request.schema.json" }
},
"deployment": { "$ref": "common/check-run-deployment.schema.json" }
},
Expand Down
62 changes: 2 additions & 60 deletions payload-schemas/schemas/check_run/created.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,36 +110,7 @@
"after": { "type": ["string", "null"] },
"pull_requests": {
"type": "array",
"items": {
"type": "object",
"required": ["url", "id", "number", "head", "base"],
"properties": {
"url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"number": { "type": "integer" },
"head": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
"items": { "$ref": "common/check-run-pull-request.schema.json" }
},
"app": { "$ref": "common/app.schema.json" },
"created_at": { "type": "string", "format": "date-time" },
Expand All @@ -150,36 +121,7 @@
"app": { "$ref": "common/app.schema.json" },
"pull_requests": {
"type": "array",
"items": {
"type": "object",
"required": ["url", "id", "number", "head", "base"],
"properties": {
"url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"number": { "type": "integer" },
"head": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
"items": { "$ref": "common/check-run-pull-request.schema.json" }
},
"deployment": { "$ref": "common/check-run-deployment.schema.json" }
},
Expand Down
62 changes: 2 additions & 60 deletions payload-schemas/schemas/check_run/requested_action.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,36 +125,7 @@
"after": { "type": ["string", "null"] },
"pull_requests": {
"type": "array",
"items": {
"type": "object",
"required": ["url", "id", "number", "head", "base"],
"properties": {
"url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"number": { "type": "integer" },
"head": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
"items": { "$ref": "common/check-run-pull-request.schema.json" }
},
"app": { "$ref": "common/app.schema.json" },
"created_at": { "type": "string", "format": "date-time" },
Expand All @@ -165,36 +136,7 @@
"app": { "$ref": "common/app.schema.json" },
"pull_requests": {
"type": "array",
"items": {
"type": "object",
"required": ["url", "id", "number", "head", "base"],
"properties": {
"url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"number": { "type": "integer" },
"head": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
"items": { "$ref": "common/check-run-pull-request.schema.json" }
},
"deployment": { "$ref": "common/check-run-deployment.schema.json" }
},
Expand Down
62 changes: 2 additions & 60 deletions payload-schemas/schemas/check_run/rerequested.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,36 +121,7 @@
"after": { "type": ["string", "null"] },
"pull_requests": {
"type": "array",
"items": {
"type": "object",
"required": ["url", "id", "number", "head", "base"],
"properties": {
"url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"number": { "type": "integer" },
"head": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
"items": { "$ref": "common/check-run-pull-request.schema.json" }
},
"app": { "$ref": "common/app.schema.json" },
"created_at": { "type": "string", "format": "date-time" },
Expand All @@ -161,36 +132,7 @@
"app": { "$ref": "common/app.schema.json" },
"pull_requests": {
"type": "array",
"items": {
"type": "object",
"required": ["url", "id", "number", "head", "base"],
"properties": {
"url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"number": { "type": "integer" },
"head": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
"items": { "$ref": "common/check-run-pull-request.schema.json" }
},
"deployment": { "$ref": "common/check-run-deployment.schema.json" }
},
Expand Down
31 changes: 1 addition & 30 deletions payload-schemas/schemas/check_suite/completed.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,36 +55,7 @@
"after": { "type": "string" },
"pull_requests": {
"type": "array",
"items": {
"type": "object",
"required": ["url", "id", "number", "head", "base"],
"properties": {
"url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"number": { "type": "integer" },
"head": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
"items": { "$ref": "common/check-run-pull-request.schema.json" }
},
"app": { "$ref": "common/app.schema.json" },
"created_at": { "type": "string", "format": "date-time" },
Expand Down
31 changes: 1 addition & 30 deletions payload-schemas/schemas/check_suite/requested.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,36 +55,7 @@
"after": { "type": "string" },
"pull_requests": {
"type": "array",
"items": {
"type": "object",
"required": ["url", "id", "number", "head", "base"],
"properties": {
"url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"number": { "type": "integer" },
"head": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha", "repo"],
"properties": {
"ref": { "type": "string" },
"sha": { "type": "string" },
"repo": { "$ref": "common/repo-ref.schema.json" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
"items": { "$ref": "common/check-run-pull-request.schema.json" }
},
"app": { "$ref": "common/app.schema.json" },
"created_at": { "type": "string", "format": "date-time" },
Expand Down
Loading

0 comments on commit 64b2be3

Please sign in to comment.