Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/server/webhooks/events/pr/comment_added.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ export interface PullRequest {
readonly links: ActorLinks
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly reviewers: unknown[]
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: string
readonly title: string
readonly toRef: Ref
Expand Down
4 changes: 2 additions & 2 deletions src/server/webhooks/events/pr/comment_deleted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export interface PullRequest {
readonly id: number
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly reviewers: unknown[]
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: string
readonly title: string
readonly toRef: Ref
Expand Down
4 changes: 2 additions & 2 deletions src/server/webhooks/events/pr/comment_edited.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ export interface PullRequest {
readonly links: ActorLinks
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly reviewers: unknown[]
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: string
readonly title: string
readonly toRef: Ref
Expand Down
2 changes: 1 addition & 1 deletion src/server/webhooks/events/pr/declined.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ 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 title: string
Expand Down
2 changes: 1 addition & 1 deletion src/server/webhooks/events/pr/deleted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ 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 title: string
Expand Down
4 changes: 2 additions & 2 deletions src/server/webhooks/events/pr/from_ref_updated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export interface PullRequest {
readonly links: ActorLinks
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly reviewers: unknown[]
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: string
readonly title: string
readonly toRef: Ref
Expand Down
2 changes: 1 addition & 1 deletion src/server/webhooks/events/pr/merged.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface PullRequest {
readonly open: boolean
readonly participants: Author[]
readonly properties: Properties
readonly reviewers: unknown[]
readonly reviewers: Author[]
readonly state: string
readonly title: string
readonly toRef: Ref
Expand Down
2 changes: 1 addition & 1 deletion src/server/webhooks/events/pr/modified.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ 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 title: string
Expand Down
4 changes: 2 additions & 2 deletions src/server/webhooks/events/pr/opened.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export interface PullRequest {
readonly links: Links
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
readonly reviewers: unknown[]
readonly participants: Author[]
readonly reviewers: Author[]
readonly state: string
readonly title: string
readonly toRef: Ref
Expand Down
2 changes: 1 addition & 1 deletion src/server/webhooks/events/pr/reviewer_approved.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ 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 title: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ 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 title: string
Expand Down
2 changes: 1 addition & 1 deletion src/server/webhooks/events/pr/reviewer_unapproved.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ 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 title: string
Expand Down
46 changes: 40 additions & 6 deletions src/server/webhooks/events/pr/reviewer_updated.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
import type {
SchemaApplicationUser,
SchemaProject,
SchemaPullRequest,
SchemaRepository,
SchemaRestMinimalRef,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
readonly emailAddress: string
readonly id: number
readonly links: ActorLinks
readonly name: string
readonly slug: string
readonly type: string
readonly type: SchemaApplicationUser["type"]
}

export interface ActorLinks {
readonly self: Self[]
}

export interface Author {
Expand All @@ -15,6 +28,11 @@ export interface Author {
readonly user: Actor
}

export interface Clone {
readonly href: string
readonly name: string
}

export interface PRReviewerUpdated {
/** The user who created the pull request. */
readonly actor: Actor
Expand All @@ -31,9 +49,11 @@ export interface PRReviewerUpdated {
export interface Project {
readonly id: number
readonly key: string
readonly links: ActorLinks
readonly name: string
readonly owner: Actor
readonly type: string
readonly owner?: Actor
readonly public: boolean
readonly type: SchemaProject["type"]
}

export interface PullRequest {
Expand All @@ -44,11 +64,12 @@ export interface PullRequest {
readonly draft: boolean
readonly fromRef: Ref
readonly id: number
readonly links: ActorLinks
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 @@ -60,16 +81,29 @@ export interface Ref {
readonly id: string
readonly latestCommit: string
readonly repository: Repository
readonly type: SchemaRestMinimalRef["type"]
}

export interface Repository {
readonly archived: boolean
readonly forkable: boolean
readonly hierarchyId: string
readonly id: number
readonly links: RepositoryLinks
readonly name: string
readonly project: Project
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}

export interface RepositoryLinks {
readonly clone: Clone[]
readonly self: Self[]
}

export interface Self {
readonly href: string
}