Skip to content

Commit

Permalink
fix: declare pull_request auto_merge properties as string|null (#829)
Browse files Browse the repository at this point in the history
* 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 <webmaster@wolfy1339.com>
  • Loading branch information
ZauberNerd and wolfy1339 authored Sep 16, 2023
1 parent 37b89f9 commit c8983a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@
"type": "object",
"required": ["enabled_by", "merge_method", "commit_title", "commit_message"],
"properties": {
"enabled_by": { "$ref": "user.schema.json" },
"enabled_by": {
"oneOf": [{ "$ref": "user.schema.json" }, { "type": "null" }]
},
"merge_method": {
"type": "string",
"enum": ["merge", "squash", "rebase"],
"description": "The merge method to use."
},
"commit_title": {
"type": "string",
"type": ["string", "null"],
"description": "Title for the merge commit message."
},
"commit_message": {
"type": "string",
"type": ["string", "null"],
"description": "Commit message for the merge commit."
}
},
Expand Down
6 changes: 3 additions & 3 deletions payload-types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3008,19 +3008,19 @@ export interface Link {
* The status of auto merging a pull request.
*/
export interface PullRequestAutoMerge {
enabled_by: User;
enabled_by: User | null;
/**
* The merge method to use.
*/
merge_method: "merge" | "squash" | "rebase";
/**
* Title for the merge commit message.
*/
commit_title: string;
commit_title: string | null;
/**
* Commit message for the merge commit.
*/
commit_message: string;
commit_message: string | null;
}
export interface DeploymentReviewApprovedEvent {
action: "approved";
Expand Down

0 comments on commit c8983a4

Please sign in to comment.