Skip to content

Commit

Permalink
feat: new changes.base property on pull_request#edited, new `merg…
Browse files Browse the repository at this point in the history
…ed_at` property on issues common schema, new `rerequestable` property on `check_suite#completed`, new `log_url` property on `deployment#created` (#598)

* fix: `draft` property on `issues` is not always present
* fix: remove `merge_commit_sha` override in `pull_request#reopened`
* fix: `runner_{id, name, group_id, group_name}` can also be `null` on `workflow_job#queued`
* feat: new `base` property in `changes` for `pull_request#edited`
* feat: new `merged_at` property on issue common schema
* feat: new `rerequestable` property for `check_suite#completed`
* feat: new `log_url` property for `deployment#created`
* fix: `Deployment#payload` can have additional properties
  • Loading branch information
wolfy1339 authored Dec 22, 2021
1 parent ce6ab8f commit 12c2a16
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 17 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"payload": {
"type": "object",
"required": [],
"additionalProperties": false
"additionalProperties": true
},
"original_environment": { "type": "string" },
"environment": { "type": "string" },
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 12c2a16

Please sign in to comment.