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(schemas): added schema for the merge_group destroyed event #962

Merged
merged 4 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions payload-schemas/api.github.com/merge_group/destroyed.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "merge_group$destroyed",
"type": "object",
"required": ["action", "merge_group", "reason", "repository", "sender"],
"properties": {
"action": { "type": "string", "enum": ["destroyed"] },
"merge_group": {
"type": "object",
"description": "The merge group.",
"required": [
"head_sha",
"head_ref",
"base_ref",
"base_sha",
"head_commit"
],
"properties": {
"head_sha": {
"type": "string",
"description": "The SHA of the merge group."
},
"head_ref": {
"type": "string",
"description": "The full ref of the merge group."
},
"base_ref": {
"type": "string",
"description": "The full ref of the branch the merge group will be merged into."
},
"base_sha": {
"type": "string",
"description": "The SHA of the merge group's parent commit."
},
"head_commit": {
"type": "object",
"description": "An expanded representation of the `head_sha` commit.",
"required": [
"id",
"tree_id",
"message",
"timestamp",
"author",
"committer"
],
"properties": {
"id": { "type": "string" },
"tree_id": { "type": "string" },
"message": { "type": "string" },
"timestamp": { "type": "string", "format": "date-time" },
"author": {
"type": "object",
"required": ["name", "email"],
"properties": {
"name": { "type": "string" },
"email": { "type": "string" }
},
"additionalProperties": false
},
"committer": {
"type": "object",
"required": ["name", "email"],
"properties": {
"name": { "type": "string" },
"email": { "type": "string" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"reason": {
"type": "string",
"enum": ["dequeued", "invalidated", "merged"]
},
"repository": { "$ref": "common/repository.schema.json" },
"sender": { "$ref": "common/user.schema.json" },
"installation": { "$ref": "common/installation-lite.schema.json" },
"organization": { "$ref": "common/organization.schema.json" }
},
"additionalProperties": false,
"title": "merge group destroyed event"
}
50 changes: 49 additions & 1 deletion payload-types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ export type MemberEvent =
| MemberEditedEvent
| MemberRemovedEvent;
export type MembershipEvent = MembershipAddedEvent | MembershipRemovedEvent;
export type MergeGroupEvent = MergeGroupChecksRequestedEvent;
export type MergeGroupEvent =
| MergeGroupChecksRequestedEvent
| MergeGroupDestroyedEvent;
export type MetaEvent = MetaDeletedEvent;
export type WebhookEvents =
| (
Expand Down Expand Up @@ -5161,6 +5163,52 @@ export interface MergeGroupChecksRequestedEvent {
installation?: InstallationLite;
organization?: Organization;
}
export interface MergeGroupDestroyedEvent {
action: "destroyed";
/**
* The merge group.
*/
merge_group: {
/**
* The SHA of the merge group.
*/
head_sha: string;
/**
* The full ref of the merge group.
*/
head_ref: string;
/**
* The full ref of the branch the merge group will be merged into.
*/
base_ref: string;
/**
* The SHA of the merge group's parent commit.
*/
base_sha: string;
/**
* An expanded representation of the `head_sha` commit.
*/
head_commit: {
id: string;
tree_id: string;
message: string;
timestamp: string;
author: {
name: string;
email: string;
};
committer: {
name: string;
email: string;
};
};
};
reason: "dequeued" | "invalidated" | "merged";
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
export interface MetaDeletedEvent {
action: "deleted";
/**
Expand Down