Skip to content

Commit 7a1cb0b

Browse files
committed
🏷️ Import some enums
1 parent 9a06192 commit 7a1cb0b

20 files changed

+103
-33
lines changed

src/server/webhooks/events/pr/comment_added.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type {
22
SchemaApplicationUser,
3+
SchemaComment,
34
SchemaProject,
5+
SchemaPullRequest,
46
SchemaPullRequestParticipant,
57
SchemaRepository,
68
SchemaRestMinimalRef,
@@ -40,7 +42,7 @@ export interface Comment {
4042
readonly id: number
4143
readonly properties: Properties
4244
readonly severity: string
43-
readonly state: string
45+
readonly state: SchemaComment["state"]
4446
readonly tasks?: unknown[]
4547
readonly text: string
4648
readonly threadResolved: boolean
@@ -89,7 +91,7 @@ export interface PullRequest {
8991
readonly open: boolean
9092
readonly participants: Author[]
9193
readonly reviewers: Author[]
92-
readonly state: string
94+
readonly state: SchemaPullRequest["state"]
9395
readonly title: string
9496
readonly toRef: Ref
9597
readonly updatedDate: number

src/server/webhooks/events/pr/comment_deleted.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import type {
2+
SchemaPullRequest,
3+
SchemaRepository,
4+
} from "../../../openapi/openapi-typescript.js"
5+
16
export interface Actor {
27
readonly active: boolean
38
readonly displayName: string
@@ -60,7 +65,7 @@ export interface PullRequest {
6065
readonly open: boolean
6166
readonly participants: Author[]
6267
readonly reviewers: Author[]
63-
readonly state: string
68+
readonly state: SchemaPullRequest["state"]
6469
readonly title: string
6570
readonly toRef: Ref
6671
readonly updatedDate: number
@@ -82,6 +87,6 @@ export interface Repository {
8287
readonly public: boolean
8388
readonly scmId: string
8489
readonly slug: string
85-
readonly state: string
90+
readonly state: SchemaRepository["state"]
8691
readonly statusMessage: string
8792
}

src/server/webhooks/events/pr/comment_edited.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type {
22
SchemaApplicationUser,
3+
SchemaComment,
34
SchemaProject,
5+
SchemaPullRequest,
46
SchemaPullRequestParticipant,
57
SchemaRepository,
68
SchemaRestMinimalRef,
@@ -40,7 +42,7 @@ export interface Comment {
4042
readonly id: number
4143
readonly properties: Properties
4244
readonly severity: string
43-
readonly state: string
45+
readonly state: SchemaComment["state"]
4446
readonly text: string
4547
readonly threadResolved: boolean
4648
readonly threadResolvedDate: number
@@ -91,7 +93,7 @@ export interface PullRequest {
9193
readonly open: boolean
9294
readonly participants: Author[]
9395
readonly reviewers: Author[]
94-
readonly state: string
96+
readonly state: SchemaPullRequest["state"]
9597
readonly title: string
9698
readonly toRef: Ref
9799
readonly updatedDate: number

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import type {
2+
SchemaPullRequest,
3+
SchemaRepository,
4+
} from "../../../openapi/openapi-typescript.js"
5+
16
export interface Actor {
27
readonly active: boolean
38
readonly displayName: string
@@ -46,7 +51,7 @@ export interface PullRequest {
4651
readonly open: boolean
4752
readonly participants: Author[]
4853
readonly reviewers: Author[]
49-
readonly state: string
54+
readonly state: SchemaPullRequest["state"]
5055
readonly title: string
5156
readonly toRef: Ref
5257
readonly updatedDate: number
@@ -68,6 +73,6 @@ export interface Repository {
6873
readonly public: boolean
6974
readonly scmId: string
7075
readonly slug: string
71-
readonly state: string
76+
readonly state: SchemaRepository["state"]
7277
readonly statusMessage: string
7378
}

src/server/webhooks/events/pr/deleted.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import type {
2+
SchemaPullRequest,
3+
SchemaRepository,
4+
} from "../../../openapi/openapi-typescript.js"
5+
16
export interface Actor {
27
readonly active: boolean
38
readonly displayName: string
@@ -45,7 +50,7 @@ export interface PullRequest {
4550
readonly open: boolean
4651
readonly participants: Author[]
4752
readonly reviewers: Author[]
48-
readonly state: string
53+
readonly state: SchemaPullRequest["state"]
4954
readonly title: string
5055
readonly toRef: Ref
5156
readonly updatedDate: number
@@ -67,6 +72,6 @@ export interface Repository {
6772
readonly public: boolean
6873
readonly scmId: string
6974
readonly slug: string
70-
readonly state: string
75+
readonly state: SchemaRepository["state"]
7176
readonly statusMessage: string
7277
}

src/server/webhooks/events/pr/from_ref_updated.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import type {
2+
SchemaPullRequest,
3+
SchemaRepository,
4+
} from "../../../openapi/openapi-typescript.js"
5+
16
export interface Actor {
27
readonly active: boolean
38
readonly displayName: string
@@ -57,7 +62,7 @@ export interface PullRequest {
5762
readonly open: boolean
5863
readonly participants: Author[]
5964
readonly reviewers: Author[]
60-
readonly state: string
65+
readonly state: SchemaPullRequest["state"]
6166
readonly title: string
6267
readonly toRef: Ref
6368
readonly updatedDate: number
@@ -81,7 +86,7 @@ export interface Repository {
8186
readonly public: boolean
8287
readonly scmId: string
8388
readonly slug: string
84-
readonly state: string
89+
readonly state: SchemaRepository["state"]
8590
readonly statusMessage: string
8691
}
8792

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import type {
2+
SchemaPullRequest,
3+
SchemaRepository,
4+
} from "../../../openapi/openapi-typescript.js"
5+
16
export interface Actor {
27
readonly active: boolean
38
readonly displayName: string
@@ -56,7 +61,7 @@ export interface PullRequest {
5661
readonly participants: Author[]
5762
readonly properties: Properties
5863
readonly reviewers: Author[]
59-
readonly state: string
64+
readonly state: SchemaPullRequest["state"]
6065
readonly title: string
6166
readonly toRef: Ref
6267
readonly updatedDate: number
@@ -78,6 +83,6 @@ export interface Repository {
7883
readonly public: boolean
7984
readonly scmId: string
8085
readonly slug: string
81-
readonly state: string
86+
readonly state: SchemaRepository["state"]
8287
readonly statusMessage: string
8388
}

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import type {
2+
SchemaPullRequest,
3+
SchemaRepository,
4+
} from "../../../openapi/openapi-typescript.js"
5+
16
export interface Actor {
27
readonly active: boolean
38
readonly displayName: string
@@ -59,7 +64,7 @@ export interface PullRequest {
5964
readonly open: boolean
6065
readonly participants: Author[]
6166
readonly reviewers: Author[]
62-
readonly state: string
67+
readonly state: SchemaPullRequest["state"]
6368
readonly title: string
6469
readonly toRef: Ref
6570
readonly updatedDate: number
@@ -81,6 +86,6 @@ export interface Repository {
8186
readonly public: boolean
8287
readonly scmId: string
8388
readonly slug: string
84-
readonly state: string
89+
readonly state: SchemaRepository["state"]
8590
readonly statusMessage: string
8691
}

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import type {
2+
SchemaPullRequest,
3+
SchemaRepository,
4+
} from "../../../openapi/openapi-typescript.js"
5+
16
export interface Actor {
27
readonly active: boolean
38
readonly displayName: string
@@ -48,7 +53,7 @@ export interface PullRequest {
4853
readonly open: boolean
4954
readonly participants: Author[]
5055
readonly reviewers: Author[]
51-
readonly state: string
56+
readonly state: SchemaPullRequest["state"]
5257
readonly title: string
5358
readonly toRef: Ref
5459
readonly updatedDate: number
@@ -70,6 +75,6 @@ export interface Repository {
7075
readonly public: boolean
7176
readonly scmId: string
7277
readonly slug: string
73-
readonly state: string
78+
readonly state: SchemaRepository["state"]
7479
readonly statusMessage: string
7580
}

src/server/webhooks/events/pr/reviewer_approved.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import type {
2+
SchemaPullRequest,
3+
SchemaRepository,
4+
} from "../../../openapi/openapi-typescript.js"
5+
16
export interface Actor {
27
readonly active: boolean
38
readonly displayName: string
@@ -56,7 +61,7 @@ export interface PullRequest {
5661
readonly open: boolean
5762
readonly participants: Participant[]
5863
readonly reviewers: Participant[]
59-
readonly state: string
64+
readonly state: SchemaPullRequest["state"]
6065
readonly title: string
6166
readonly toRef: Ref
6267
readonly updatedDate: number
@@ -78,6 +83,6 @@ export interface Repository {
7883
readonly public: boolean
7984
readonly scmId: string
8085
readonly slug: string
81-
readonly state: string
86+
readonly state: SchemaRepository["state"]
8287
readonly statusMessage: string
8388
}

src/server/webhooks/events/pr/reviewer_changes_requested.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import type {
2+
SchemaPullRequest,
3+
SchemaRepository,
4+
} from "../../../openapi/openapi-typescript.js"
5+
16
export interface Actor {
27
readonly active: boolean
38
readonly displayName: string
@@ -51,7 +56,7 @@ export interface PullRequest {
5156
readonly open: boolean
5257
readonly participants: Participant[]
5358
readonly reviewers: Participant[]
54-
readonly state: string
59+
readonly state: SchemaPullRequest["state"]
5560
readonly title: string
5661
readonly toRef: Ref
5762
readonly updatedDate: number
@@ -73,6 +78,6 @@ export interface Repository {
7378
readonly public: boolean
7479
readonly scmId: string
7580
readonly slug: string
76-
readonly state: string
81+
readonly state: SchemaRepository["state"]
7782
readonly statusMessage: string
7883
}

src/server/webhooks/events/pr/reviewer_unapproved.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import type {
2+
SchemaPullRequest,
3+
SchemaRepository,
4+
} from "../../../openapi/openapi-typescript.js"
5+
16
export interface Actor {
27
readonly active: boolean
38
readonly displayName: string
@@ -51,7 +56,7 @@ export interface PullRequest {
5156
readonly open: boolean
5257
readonly participants: Participant[]
5358
readonly reviewers: Participant[]
54-
readonly state: string
59+
readonly state: SchemaPullRequest["state"]
5560
readonly title: string
5661
readonly toRef: Ref
5762
readonly updatedDate: number
@@ -73,6 +78,6 @@ export interface Repository {
7378
readonly public: boolean
7479
readonly scmId: string
7580
readonly slug: string
76-
readonly state: string
81+
readonly state: SchemaRepository["state"]
7782
readonly statusMessage: string
7883
}

src/server/webhooks/events/repo/comment_added.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { SchemaRepository } from "../../../openapi/openapi-typescript.js"
2+
13
export interface Actor {
24
readonly active: boolean
35
readonly displayName: string
@@ -61,6 +63,6 @@ export interface Repository {
6163
readonly public: boolean
6264
readonly scmId: string
6365
readonly slug: string
64-
readonly state: string
66+
readonly state: SchemaRepository["state"]
6567
readonly statusMessage: string
6668
}

src/server/webhooks/events/repo/comment_deleted.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { SchemaRepository } from "../../../openapi/openapi-typescript.js"
2+
13
export interface Actor {
24
readonly active: boolean
35
readonly displayName: string
@@ -50,6 +52,6 @@ export interface Repository {
5052
readonly public: boolean
5153
readonly scmId: string
5254
readonly slug: string
53-
readonly state: string
55+
readonly state: SchemaRepository["state"]
5456
readonly statusMessage: string
5557
}

src/server/webhooks/events/repo/comment_edited.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { SchemaRepository } from "../../../openapi/openapi-typescript.js"
2+
13
export interface Actor {
24
readonly active: boolean
35
readonly displayName: string
@@ -63,6 +65,6 @@ export interface Repository {
6365
readonly public: boolean
6466
readonly scmId: string
6567
readonly slug: string
66-
readonly state: string
68+
readonly state: SchemaRepository["state"]
6769
readonly statusMessage: string
6870
}

src/server/webhooks/events/repo/forked.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { SchemaRepository } from "../../../openapi/openapi-typescript.js"
2+
13
export interface Actor {
24
readonly active: boolean
35
readonly displayName: string
@@ -16,7 +18,7 @@ export interface Origin {
1618
readonly public: boolean
1719
readonly scmId: string
1820
readonly slug: string
19-
readonly state: string
21+
readonly state: SchemaRepository["state"]
2022
readonly statusMessage: string
2123
}
2224

@@ -51,6 +53,6 @@ export interface Repository {
5153
readonly public: boolean
5254
readonly scmId: string
5355
readonly slug: string
54-
readonly state: string
56+
readonly state: SchemaRepository["state"]
5557
readonly statusMessage: string
5658
}

src/server/webhooks/events/repo/modified.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { SchemaRepository } from "../../../openapi/openapi-typescript.js"
2+
13
export interface Actor {
24
readonly active: boolean
35
readonly displayName: string
@@ -37,6 +39,6 @@ export interface Repository {
3739
readonly public: boolean
3840
readonly scmId: string
3941
readonly slug: string
40-
readonly state: string
42+
readonly state: SchemaRepository["state"]
4143
readonly statusMessage: string
4244
}

0 commit comments

Comments
 (0)