Skip to content

Commit c8983a4

Browse files
fix: declare pull_request auto_merge properties as string|null (#829)
* fix: declare pull_request auto_merge properties as string|null See: https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request Co-authored-by: wolfy1339 <[email protected]>
1 parent 37b89f9 commit c8983a4

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

payload-schemas/api.github.com/common/auto-merge.schema.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@
44
"type": "object",
55
"required": ["enabled_by", "merge_method", "commit_title", "commit_message"],
66
"properties": {
7-
"enabled_by": { "$ref": "user.schema.json" },
7+
"enabled_by": {
8+
"oneOf": [{ "$ref": "user.schema.json" }, { "type": "null" }]
9+
},
810
"merge_method": {
911
"type": "string",
1012
"enum": ["merge", "squash", "rebase"],
1113
"description": "The merge method to use."
1214
},
1315
"commit_title": {
14-
"type": "string",
16+
"type": ["string", "null"],
1517
"description": "Title for the merge commit message."
1618
},
1719
"commit_message": {
18-
"type": "string",
20+
"type": ["string", "null"],
1921
"description": "Commit message for the merge commit."
2022
}
2123
},

payload-types/schema.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3008,19 +3008,19 @@ export interface Link {
30083008
* The status of auto merging a pull request.
30093009
*/
30103010
export interface PullRequestAutoMerge {
3011-
enabled_by: User;
3011+
enabled_by: User | null;
30123012
/**
30133013
* The merge method to use.
30143014
*/
30153015
merge_method: "merge" | "squash" | "rebase";
30163016
/**
30173017
* Title for the merge commit message.
30183018
*/
3019-
commit_title: string;
3019+
commit_title: string | null;
30203020
/**
30213021
* Commit message for the merge commit.
30223022
*/
3023-
commit_message: string;
3023+
commit_message: string | null;
30243024
}
30253025
export interface DeploymentReviewApprovedEvent {
30263026
action: "approved";

0 commit comments

Comments
 (0)