diff --git a/.gitignore b/.gitignore index 8d44485..e273011 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ package-lock.json .env.*.local .env.local + +### JetBrains ### +.idea + # Created by https://www.toptal.com/developers/gitignore/api/linux,macos,windows,node # Edit at https://www.toptal.com/developers/gitignore?templates=linux,macos,windows,node diff --git a/src/server/webhooks/events/pr/declined.ts b/src/server/webhooks/events/pr/declined.ts index b76d8d8..cf0bd2f 100644 --- a/src/server/webhooks/events/pr/declined.ts +++ b/src/server/webhooks/events/pr/declined.ts @@ -11,6 +11,15 @@ export interface Actor { readonly name: string readonly slug: string readonly type: string + readonly links: ActorLinks +} + +export interface ActorLinks { + readonly self: Self[] +} + +export interface Self { + readonly href: string } export interface Author { @@ -56,6 +65,8 @@ export interface PullRequest { readonly toRef: Ref readonly updatedDate: number readonly version: number + readonly links: ActorLinks + readonly description: string } export interface Ref { diff --git a/src/server/webhooks/events/pr/merged.ts b/src/server/webhooks/events/pr/merged.ts index ef02e25..b11a4f5 100644 --- a/src/server/webhooks/events/pr/merged.ts +++ b/src/server/webhooks/events/pr/merged.ts @@ -1,7 +1,7 @@ import type { SchemaPullRequest, SchemaRepository, -} from "../../../openapi/openapi-typescript.js" +} from "../../../openapi/index.js" export interface Actor { readonly active: boolean diff --git a/src/server/webhooks/events/pr/modified.ts b/src/server/webhooks/events/pr/modified.ts index 1cdcc7c..7950c8a 100644 --- a/src/server/webhooks/events/pr/modified.ts +++ b/src/server/webhooks/events/pr/modified.ts @@ -1,7 +1,7 @@ import type { SchemaPullRequest, SchemaRepository, -} from "../../../openapi/openapi-typescript.js" +} from "../../../openapi/index.js" export interface Actor { readonly active: boolean @@ -11,6 +11,15 @@ export interface Actor { readonly name: string readonly slug: string readonly type: string + readonly links: ActorLinks +} + +export interface ActorLinks { + readonly self: Self[] +} + +export interface Self { + readonly href: string } export interface Author { @@ -29,27 +38,30 @@ export interface PRModified { readonly previousDescription: string readonly previousDraft: boolean /** Previous target of the pull request, may not have changed */ - readonly previousTarget: PreviousTarget + readonly previousTarget: Ref /** Previous title of the pull request, may not have changed */ readonly previousTitle: string /** Details of the pull request created. */ readonly pullRequest: PullRequest } -export interface PreviousTarget { +export interface Ref { readonly displayId: string readonly id: string - readonly latestChangeset: string + readonly latestChangeset?: string readonly latestCommit: string readonly type: string + readonly repository?: Repository } export interface Project { readonly id: number readonly key: string readonly name: string - readonly owner: Actor + readonly owner?: Actor readonly type: string + readonly public: boolean + readonly links: ActorLinks } export interface PullRequest { @@ -69,13 +81,7 @@ export interface PullRequest { readonly toRef: Ref readonly updatedDate: number readonly version: number -} - -export interface Ref { - readonly displayId: string - readonly id: string - readonly latestCommit: string - readonly repository: Repository + readonly links: ActorLinks } export interface Repository { @@ -88,4 +94,17 @@ export interface Repository { readonly slug: string readonly state: SchemaRepository["state"] readonly statusMessage: string + readonly hierarchyId: string + readonly archived: boolean + readonly links: RepositoryLinks +} + +export interface RepositoryLinks { + readonly clone: Clone[] + readonly self: Self[] +} + +export interface Clone { + readonly href: string + readonly name: string } diff --git a/src/server/webhooks/events/pr/opened.ts b/src/server/webhooks/events/pr/opened.ts index ce1cc4a..88d18af 100644 --- a/src/server/webhooks/events/pr/opened.ts +++ b/src/server/webhooks/events/pr/opened.ts @@ -1,7 +1,7 @@ import type { SchemaPullRequest, SchemaRepository, -} from "../../../openapi/openapi-typescript.js" +} from "../../../openapi/index.js" export interface Actor { readonly active: boolean @@ -11,6 +11,15 @@ export interface Actor { readonly name: string readonly slug: string readonly type: string + readonly links: SelfLinks +} + +export interface SelfLinks { + readonly self: Self[] +} + +export interface Self { + readonly href: string } export interface Author { @@ -39,6 +48,7 @@ export interface Project { readonly name: string readonly public: boolean readonly type: string + readonly links: SelfLinks } export interface PullRequest { @@ -58,12 +68,14 @@ export interface PullRequest { readonly toRef: Ref readonly updatedDate: number readonly version: number + readonly description: string } export interface Ref { readonly displayId: string readonly id: string readonly latestCommit: string + readonly type: string readonly repository: Repository } @@ -77,4 +89,17 @@ export interface Repository { readonly slug: string readonly state: SchemaRepository["state"] readonly statusMessage: string + readonly hierarchyId: string + readonly archived: boolean + readonly links: RepositoryLinks +} + +export interface RepositoryLinks { + readonly clone: Clone[] + readonly self: Self[] +} + +export interface Clone { + readonly href: string + readonly name: string }