Skip to content

Commit

Permalink
feat: new installation_target event (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Jan 18, 2023
1 parent 88dc708 commit 5313a62
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "installation_target$renamed",
"type": "object",
"required": ["action", "target_type", "account", "changes", "installation"],
"properties": {
"changes": {
"type": "object",
"properties": {
"login": {
"type": "object",
"required": ["from"],
"properties": { "from": { "type": "string" } },
"additionalProperties": false
},
"slug": {
"type": "object",
"properties": { "from": { "type": "string" } },
"required": ["from"],
"additionalProperties": false
}
},
"additionalProperties": false
},
"action": { "type": "string", "enum": ["renamed"] },
"account": {
"type": "object",
"required": ["id", "node_id", "avatar_url", "html_url"],
"properties": {
"avatar_url": { "type": "string", "format": "uri" },
"created_at": { "type": "string", "format": "date-time" },
"description": { "type": ["null"] },
"events_url": { "type": "string", "format": "uri-template" },
"followers": { "type": "integer" },
"followers_url": { "type": "string", "format": "uri" },
"following": { "type": "integer" },
"following_url": { "type": "string", "format": "uri-template" },
"gists_url": { "type": "string", "format": "uri-template" },
"gravatar_id": { "type": "string" },
"has_organization_projects": { "type": "boolean" },
"has_repository_projects": { "type": "boolean" },
"hooks_url": { "type": "string" },
"html_url": { "type": "string", "format": "uri" },
"id": { "type": "integer" },
"is_verified": { "type": "boolean" },
"issues_url": { "type": "string", "format": "uri-template" },
"login": { "type": "string" },
"members_url": { "type": "string", "format": "uri-template" },
"name": { "type": "string" },
"node_id": { "type": "string" },
"organizations_url": { "type": "string", "format": "uri" },
"public_gists": { "type": "integer" },
"public_members_url": { "type": "string", "format": "uri-template" },
"public_repos": { "type": "integer" },
"received_events_url": { "type": "string", "format": "uri" },
"repos_url": { "type": "string", "format": "uri" },
"site_admin": { "type": "boolean" },
"slug": { "type": "string" },
"starred_url": { "type": "string", "format": "uri-template" },
"subscriptions_url": { "type": "string", "format": "uri" },
"type": { "type": "string", "enum": ["Bot", "User", "Organization"] },
"updated_at": { "type": "string", "format": "date-time" },
"url": { "type": "string", "format": "uri" },
"website_url": { "type": ["null"] }
},
"additionalProperties": false
},
"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" },
"target_type": { "type": "string" }
},
"additionalProperties": false,
"title": "installation_target renamed event",
"description": "Somebody renamed the user or organization account that a GitHub App is installed on."
}
59 changes: 59 additions & 0 deletions payload-types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export type Schema =
| GollumEvent
| InstallationEvent
| InstallationRepositoriesEvent
| InstallationTargetEvent
| IssueCommentEvent
| IssuesEvent
| LabelEvent
Expand Down Expand Up @@ -142,6 +143,7 @@ export type InstallationEvent =
export type InstallationRepositoriesEvent =
| InstallationRepositoriesAddedEvent
| InstallationRepositoriesRemovedEvent;
export type InstallationTargetEvent = InstallationTargetRenamedEvent;
export type IssueCommentEvent =
| IssueCommentCreatedEvent
| IssueCommentDeletedEvent
Expand Down Expand Up @@ -3599,6 +3601,62 @@ export interface InstallationRepositoriesRemovedEvent {
requester: User | null;
sender: User;
}
/**
* Somebody renamed the user or organization account that a GitHub App is installed on.
*/
export interface InstallationTargetRenamedEvent {
changes: {
login?: {
from: string;
};
slug?: {
from: string;
};
};
action: "renamed";
account: {
avatar_url: string;
created_at?: string;
description?: null;
events_url?: string;
followers?: number;
followers_url?: string;
following?: number;
following_url?: string;
gists_url?: string;
gravatar_id?: string;
has_organization_projects?: boolean;
has_repository_projects?: boolean;
hooks_url?: string;
html_url: string;
id: number;
is_verified?: boolean;
issues_url?: string;
login?: string;
members_url?: string;
name?: string;
node_id: string;
organizations_url?: string;
public_gists?: number;
public_members_url?: string;
public_repos?: number;
received_events_url?: string;
repos_url?: string;
site_admin?: boolean;
slug?: string;
starred_url?: string;
subscriptions_url?: string;
type?: "Bot" | "User" | "Organization";
updated_at?: string;
url?: string;
website_url?: null;
};
repository?: Repository;
sender?: User;
installation: InstallationLite;
organization?: Organization;
target_type: string;
}
export interface IssueCommentCreatedEvent {
action: "created";
/**
Expand Down Expand Up @@ -7941,6 +7999,7 @@ export interface EventPayloadMap {
gollum: GollumEvent;
installation: InstallationEvent;
installation_repositories: InstallationRepositoriesEvent;
installation_target: InstallationTargetEvent;
issue_comment: IssueCommentEvent;
issues: IssuesEvent;
label: LabelEvent;
Expand Down

0 comments on commit 5313a62

Please sign in to comment.