Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new changes.base property on pull_request#edited, new merged_at property on issues common schema, new rerequestable property on check_suite#completed, new log_url property on deployment#created #598

Merged
merged 9 commits into from Dec 22, 2021
Expand Up @@ -71,6 +71,7 @@
"app": { "$ref": "common/app.schema.json" },
"created_at": { "type": "string", "format": "date-time" },
"updated_at": { "type": "string", "format": "date-time" },
"rerequestable": { "type": "boolean" },
"latest_check_runs_count": { "type": "integer" },
"check_runs_url": { "type": "string", "format": "uri" },
"head_commit": { "$ref": "common/commit-simple.schema.json" }
Expand Down
6 changes: 3 additions & 3 deletions payload-schemas/api.github.com/common/issue.schema.json
Expand Up @@ -23,8 +23,7 @@
"author_association",
"active_lock_reason",
"body",
"reactions",
"draft"
"reactions"
],
"type": "object",
"properties": {
Expand Down Expand Up @@ -76,7 +75,8 @@
"url": { "type": "string", "format": "uri" },
"html_url": { "type": "string", "format": "uri" },
"diff_url": { "type": "string", "format": "uri" },
"patch_url": { "type": "string", "format": "uri" }
"patch_url": { "type": "string", "format": "uri" },
"merged_at": { "type": ["string", "null"], "format": "date-time" }
},
"additionalProperties": false
},
Expand Down
Expand Up @@ -42,7 +42,7 @@
"payload": {
"type": "object",
"required": [],
"additionalProperties": false
"additionalProperties": true
},
"original_environment": { "type": "string" },
"environment": { "type": "string" },
Expand Down
Expand Up @@ -43,6 +43,7 @@
},
"environment": { "type": "string" },
"environment_url": { "type": "string", "format": "uri" },
"log_url": { "type": "string", "format": "uri" },
"target_url": {
"type": "string",
"description": "The optional link added to the status."
Expand Down
19 changes: 19 additions & 0 deletions payload-schemas/api.github.com/pull_request/edited.schema.json
Expand Up @@ -38,6 +38,25 @@
}
},
"additionalProperties": false
},
"base": {
"type": "object",
"required": ["ref", "sha"],
"properties": {
"ref": {
"type": "object",
"required": ["from"],
"properties": { "from": { "type": "string" } },
"additionalProperties": false
},
"sha": {
"type": "object",
"required": ["from"],
"properties": { "from": { "type": "string" } },
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
Expand Down
Expand Up @@ -15,15 +15,13 @@
"state",
"closed_at",
"merged_at",
"merge_commit_sha",
"merged",
"merged_by"
],
"properties": {
"state": { "type": "string", "enum": ["open"] },
"closed_at": { "type": "null" },
"merged_at": { "type": "null" },
"merge_commit_sha": { "type": "null" },
"merged": { "type": "boolean" },
"merged_by": { "type": "null" }
},
Expand Down
Expand Up @@ -51,10 +51,10 @@
},
"conclusion": { "type": "null" },
"labels": { "type": "array", "items": { "type": "string" } },
"runner_id": { "type": "integer" },
"runner_name": { "type": "string" },
"runner_group_id": { "type": "integer" },
"runner_group_name": { "type": "string" },
"runner_id": { "type": ["integer", "null"] },
"runner_name": { "type": ["string", "null"] },
"runner_group_id": { "type": ["integer", "null"] },
"runner_group_name": { "type": ["string", "null"] },
"started_at": { "type": "string", "format": "date-time" },
"completed_at": { "type": "null" }
},
Expand Down
26 changes: 19 additions & 7 deletions payload-types/schema.d.ts
Expand Up @@ -1276,6 +1276,7 @@ export interface CheckSuiteCompletedEvent {
app: App;
created_at: string;
updated_at: string;
rerequestable?: boolean;
latest_check_runs_count: number;
check_runs_url: string;
head_commit: SimpleCommit;
Expand Down Expand Up @@ -2095,7 +2096,9 @@ export interface DeploymentCreatedEvent {
sha: string;
ref: string;
task: string;
payload: {};
payload: {
[k: string]: unknown;
};
original_environment: string;
environment: string;
transient_environment?: boolean;
Expand Down Expand Up @@ -2135,6 +2138,7 @@ export interface DeploymentStatusCreatedEvent {
description: string;
environment: string;
environment_url?: string;
log_url?: string;
/**
* The optional link added to the status.
*/
Expand Down Expand Up @@ -2925,13 +2929,14 @@ export interface Issue {
closed_at: string | null;
author_association: AuthorAssociation;
active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | null;
draft: boolean;
draft?: boolean;
performed_via_github_app?: App | null;
pull_request?: {
url?: string;
html_url?: string;
diff_url?: string;
patch_url?: string;
merged_at?: string | null;
};
/**
* Contents of the issue
Expand Down Expand Up @@ -4401,6 +4406,14 @@ export interface PullRequestEditedEvent {
*/
from: string;
};
base?: {
ref: {
from: string;
};
sha: {
from: string;
};
};
};
pull_request: PullRequest;
repository: Repository;
Expand Down Expand Up @@ -4484,7 +4497,6 @@ export interface PullRequestReopenedEvent {
state: "open";
closed_at: null;
merged_at: null;
merge_commit_sha: null;
merged: boolean;
merged_by: null;
};
Expand Down Expand Up @@ -6108,10 +6120,10 @@ export interface WorkflowJobQueuedEvent {
steps: WorkflowStep[];
conclusion: null;
labels: string[];
runner_id: number;
runner_name: string;
runner_group_id: number;
runner_group_name: string;
runner_id: number | null;
runner_name: string | null;
runner_group_id: number | null;
runner_group_name: string | null;
started_at: string;
completed_at: null;
};
Expand Down