Skip to content

✨ Use a real event to update PRReviewerUpdated #8

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

Merged
merged 2 commits into from
Sep 30, 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
10 changes: 6 additions & 4 deletions src/server/webhooks/events/pr/comment_added.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type {
SchemaApplicationUser,
SchemaComment,
SchemaProject,
SchemaPullRequest,
SchemaPullRequestParticipant,
SchemaRepository,
SchemaRestMinimalRef,
Expand Down Expand Up @@ -40,7 +42,7 @@ export interface Comment {
readonly id: number
readonly properties: Properties
readonly severity: string
readonly state: string
readonly state: SchemaComment["state"]
readonly tasks?: unknown[]
readonly text: string
readonly threadResolved: boolean
Expand Down Expand Up @@ -87,9 +89,9 @@ export interface PullRequest {
readonly links: ActorLinks
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly reviewers: unknown[]
readonly state: string
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand Down
13 changes: 9 additions & 4 deletions src/server/webhooks/events/pr/comment_deleted.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type {
SchemaPullRequest,
SchemaRepository,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
Expand Down Expand Up @@ -58,9 +63,9 @@ export interface PullRequest {
readonly id: number
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly reviewers: unknown[]
readonly state: string
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand All @@ -82,6 +87,6 @@ export interface Repository {
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}
10 changes: 6 additions & 4 deletions src/server/webhooks/events/pr/comment_edited.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type {
SchemaApplicationUser,
SchemaComment,
SchemaProject,
SchemaPullRequest,
SchemaPullRequestParticipant,
SchemaRepository,
SchemaRestMinimalRef,
Expand Down Expand Up @@ -40,7 +42,7 @@ export interface Comment {
readonly id: number
readonly properties: Properties
readonly severity: string
readonly state: string
readonly state: SchemaComment["state"]
readonly text: string
readonly threadResolved: boolean
readonly threadResolvedDate: number
Expand Down Expand Up @@ -89,9 +91,9 @@ export interface PullRequest {
readonly links: ActorLinks
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly reviewers: unknown[]
readonly state: string
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand Down
11 changes: 8 additions & 3 deletions src/server/webhooks/events/pr/declined.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type {
SchemaPullRequest,
SchemaRepository,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
Expand Down Expand Up @@ -44,9 +49,9 @@ export interface PullRequest {
readonly id: number
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: string
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand All @@ -68,6 +73,6 @@ export interface Repository {
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}
11 changes: 8 additions & 3 deletions src/server/webhooks/events/pr/deleted.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type {
SchemaPullRequest,
SchemaRepository,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
Expand Down Expand Up @@ -43,9 +48,9 @@ export interface PullRequest {
readonly id: number
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: string
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand All @@ -67,6 +72,6 @@ export interface Repository {
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}
13 changes: 9 additions & 4 deletions src/server/webhooks/events/pr/from_ref_updated.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type {
SchemaPullRequest,
SchemaRepository,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
Expand Down Expand Up @@ -55,9 +60,9 @@ export interface PullRequest {
readonly links: ActorLinks
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly reviewers: unknown[]
readonly state: string
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand All @@ -81,7 +86,7 @@ export interface Repository {
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}

Expand Down
11 changes: 8 additions & 3 deletions src/server/webhooks/events/pr/merged.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type {
SchemaPullRequest,
SchemaRepository,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
Expand Down Expand Up @@ -55,8 +60,8 @@ export interface PullRequest {
readonly open: boolean
readonly participants: Author[]
readonly properties: Properties
readonly reviewers: unknown[]
readonly state: string
readonly reviewers: Author[]
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand All @@ -78,6 +83,6 @@ export interface Repository {
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}
11 changes: 8 additions & 3 deletions src/server/webhooks/events/pr/modified.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type {
SchemaPullRequest,
SchemaRepository,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
Expand Down Expand Up @@ -57,9 +62,9 @@ export interface PullRequest {
readonly id: number
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: string
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand All @@ -81,6 +86,6 @@ export interface Repository {
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}
13 changes: 9 additions & 4 deletions src/server/webhooks/events/pr/opened.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type {
SchemaPullRequest,
SchemaRepository,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
Expand Down Expand Up @@ -46,9 +51,9 @@ export interface PullRequest {
readonly links: Links
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly reviewers: unknown[]
readonly state: string
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand All @@ -70,6 +75,6 @@ export interface Repository {
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}
11 changes: 8 additions & 3 deletions src/server/webhooks/events/pr/reviewer_approved.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type {
SchemaPullRequest,
SchemaRepository,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
Expand Down Expand Up @@ -54,9 +59,9 @@ export interface PullRequest {
readonly links: Links
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly participants: Participant[]
readonly reviewers: Participant[]
readonly state: string
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand All @@ -78,6 +83,6 @@ export interface Repository {
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}
11 changes: 8 additions & 3 deletions src/server/webhooks/events/pr/reviewer_changes_requested.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type {
SchemaPullRequest,
SchemaRepository,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
Expand Down Expand Up @@ -49,9 +54,9 @@ export interface PullRequest {
readonly id: number
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly participants: Participant[]
readonly reviewers: Participant[]
readonly state: string
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand All @@ -73,6 +78,6 @@ export interface Repository {
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}
11 changes: 8 additions & 3 deletions src/server/webhooks/events/pr/reviewer_unapproved.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import type {
SchemaPullRequest,
SchemaRepository,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
Expand Down Expand Up @@ -49,9 +54,9 @@ export interface PullRequest {
readonly id: number
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly participants: Participant[]
readonly reviewers: Participant[]
readonly state: string
readonly state: SchemaPullRequest["state"]
readonly title: string
readonly toRef: Ref
readonly updatedDate: number
Expand All @@ -73,6 +78,6 @@ export interface Repository {
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}
Loading