Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dbac709

Browse files
Update PR event types (#14)
1 parent 5103188 commit dbac709

File tree

5 files changed

+73
-14
lines changed

5 files changed

+73
-14
lines changed

‎.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ package-lock.json
88
.env.*.local
99
.env.local
1010

11+
12+
### JetBrains ###
13+
.idea
14+
1115
# Created by https://www.toptal.com/developers/gitignore/api/linux,macos,windows,node
1216
# Edit at https://www.toptal.com/developers/gitignore?templates=linux,macos,windows,node
1317

‎src/server/webhooks/events/pr/declined.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ export interface Actor {
1111
readonly name: string
1212
readonly slug: string
1313
readonly type: string
14+
readonly links: ActorLinks
15+
}
16+
17+
export interface ActorLinks {
18+
readonly self: Self[]
19+
}
20+
21+
export interface Self {
22+
readonly href: string
1423
}
1524

1625
export interface Author {
@@ -56,6 +65,8 @@ export interface PullRequest {
5665
readonly toRef: Ref
5766
readonly updatedDate: number
5867
readonly version: number
68+
readonly links: ActorLinks
69+
readonly description: string
5970
}
6071

6172
export interface Ref {

‎src/server/webhooks/events/pr/merged.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type {
22
SchemaPullRequest,
33
SchemaRepository,
4-
} from "../../../openapi/openapi-typescript.js"
4+
} from "../../../openapi/index.js"
55

66
export interface Actor {
77
readonly active: boolean

‎src/server/webhooks/events/pr/modified.ts

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type {
22
SchemaPullRequest,
33
SchemaRepository,
4-
} from "../../../openapi/openapi-typescript.js"
4+
} from "../../../openapi/index.js"
55

66
export interface Actor {
77
readonly active: boolean
@@ -11,6 +11,15 @@ export interface Actor {
1111
readonly name: string
1212
readonly slug: string
1313
readonly type: string
14+
readonly links: ActorLinks
15+
}
16+
17+
export interface ActorLinks {
18+
readonly self: Self[]
19+
}
20+
21+
export interface Self {
22+
readonly href: string
1423
}
1524

1625
export interface Author {
@@ -29,27 +38,30 @@ export interface PRModified {
2938
readonly previousDescription: string
3039
readonly previousDraft: boolean
3140
/** Previous target of the pull request, may not have changed */
32-
readonly previousTarget: PreviousTarget
41+
readonly previousTarget: Ref
3342
/** Previous title of the pull request, may not have changed */
3443
readonly previousTitle: string
3544
/** Details of the pull request created. */
3645
readonly pullRequest: PullRequest
3746
}
3847

39-
export interface PreviousTarget {
48+
export interface Ref {
4049
readonly displayId: string
4150
readonly id: string
42-
readonly latestChangeset: string
51+
readonly latestChangeset?: string
4352
readonly latestCommit: string
4453
readonly type: string
54+
readonly repository?: Repository
4555
}
4656

4757
export interface Project {
4858
readonly id: number
4959
readonly key: string
5060
readonly name: string
51-
readonly owner: Actor
61+
readonly owner?: Actor
5262
readonly type: string
63+
readonly public: boolean
64+
readonly links: ActorLinks
5365
}
5466

5567
export interface PullRequest {
@@ -69,13 +81,7 @@ export interface PullRequest {
6981
readonly toRef: Ref
7082
readonly updatedDate: number
7183
readonly version: number
72-
}
73-
74-
export interface Ref {
75-
readonly displayId: string
76-
readonly id: string
77-
readonly latestCommit: string
78-
readonly repository: Repository
84+
readonly links: ActorLinks
7985
}
8086

8187
export interface Repository {
@@ -88,4 +94,17 @@ export interface Repository {
8894
readonly slug: string
8995
readonly state: SchemaRepository["state"]
9096
readonly statusMessage: string
97+
readonly hierarchyId: string
98+
readonly archived: boolean
99+
readonly links: RepositoryLinks
100+
}
101+
102+
export interface RepositoryLinks {
103+
readonly clone: Clone[]
104+
readonly self: Self[]
105+
}
106+
107+
export interface Clone {
108+
readonly href: string
109+
readonly name: string
91110
}

‎src/server/webhooks/events/pr/opened.ts

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type {
22
SchemaPullRequest,
33
SchemaRepository,
4-
} from "../../../openapi/openapi-typescript.js"
4+
} from "../../../openapi/index.js"
55

66
export interface Actor {
77
readonly active: boolean
@@ -11,6 +11,15 @@ export interface Actor {
1111
readonly name: string
1212
readonly slug: string
1313
readonly type: string
14+
readonly links: SelfLinks
15+
}
16+
17+
export interface SelfLinks {
18+
readonly self: Self[]
19+
}
20+
21+
export interface Self {
22+
readonly href: string
1423
}
1524

1625
export interface Author {
@@ -39,6 +48,7 @@ export interface Project {
3948
readonly name: string
4049
readonly public: boolean
4150
readonly type: string
51+
readonly links: SelfLinks
4252
}
4353

4454
export interface PullRequest {
@@ -58,12 +68,14 @@ export interface PullRequest {
5868
readonly toRef: Ref
5969
readonly updatedDate: number
6070
readonly version: number
71+
readonly description: string
6172
}
6273

6374
export interface Ref {
6475
readonly displayId: string
6576
readonly id: string
6677
readonly latestCommit: string
78+
readonly type: string
6779
readonly repository: Repository
6880
}
6981

@@ -77,4 +89,17 @@ export interface Repository {
7789
readonly slug: string
7890
readonly state: SchemaRepository["state"]
7991
readonly statusMessage: string
92+
readonly hierarchyId: string
93+
readonly archived: boolean
94+
readonly links: RepositoryLinks
95+
}
96+
97+
export interface RepositoryLinks {
98+
readonly clone: Clone[]
99+
readonly self: Self[]
100+
}
101+
102+
export interface Clone {
103+
readonly href: string
104+
readonly name: string
80105
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /