File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
packages/core/src/resources Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import type {
1313import type { CommitDiffSchema , CommitSchema } from './Commits' ;
1414import type { IssueSchema , TimeStatsSchema } from './Issues' ;
1515import type { ExpandedPipelineSchema , PipelineSchema } from './Pipelines' ;
16+ import type { ReviewerState } from './Webhooks' ;
1617import type { SimpleProjectSchema } from './Projects' ;
1718import type { TodoSchema } from './TodoLists' ;
1819import type { SimpleUserSchema } from './Users' ;
@@ -191,7 +192,7 @@ export interface MergeRequestChangesSchema
191192
192193export interface MergeRequestReviewerSchema extends Record < string , unknown > {
193194 user : MappedOmit < SimpleUserSchema , 'created_at' > ;
194- state : 'unreviewed' | 'requested_changes' | 'reviewed' | 'approved' | 'review_started' ;
195+ state : ReviewerState ;
195196 created_at : string ;
196197}
197198
Original file line number Diff line number Diff line change @@ -64,7 +64,16 @@ export interface WebhookDiffSchema {
6464 deleted_file : boolean ;
6565}
6666
67- export type WebhookUserSchema = Pick < SimpleUserSchema , 'id' | 'name' | 'username' | 'avatar_url' > ;
67+ export type ReviewerState = 'unreviewed' | 'requested_changes' | 'reviewed' | 'approved' | 'review_started' | 'unapproved' ;
68+
69+ export type WebhookUserSchema = Pick < SimpleUserSchema , 'id' | 'name' | 'username' | 'avatar_url' > & {
70+ email : string ;
71+ } ;
72+
73+ export interface WebhookReviewerSchema extends WebhookUserSchema {
74+ state : ReviewerState ;
75+ re_requested : boolean ;
76+ }
6877
6978export interface BaseWebhookEventSchema {
7079 object_kind : string ;
@@ -376,8 +385,8 @@ export interface WebhookMergeRequestEventSchema extends BaseWebhookEventSchema {
376385 current : WebhookUserSchema [ ] | null ;
377386 } ;
378387 reviewers : {
379- previous : WebhookUserSchema [ ] | null ;
380- current : WebhookUserSchema [ ] | null ;
388+ previous : WebhookReviewerSchema [ ] | null ;
389+ current : WebhookReviewerSchema [ ] | null ;
381390 } ;
382391 labels : {
383392 previous : WebhookLabelSchema [ ] | null ;
@@ -393,7 +402,7 @@ export interface WebhookMergeRequestEventSchema extends BaseWebhookEventSchema {
393402 } ;
394403 } ;
395404 assignees : WebhookUserSchema [ ] | null ;
396- reviewers : WebhookUserSchema [ ] | null ;
405+ reviewers : WebhookReviewerSchema [ ] | null ;
397406}
398407
399408export interface WebhookWikiEventSchema extends MappedOmit < BaseWebhookEventSchema , 'event_name' > {
You can’t perform that action at this time.
0 commit comments