@@ -39,24 +39,34 @@ export type GitHubEventIssuesOpened = { action: 'opened'; issue: GitHubIssue };
39
39
export type GitHubEventIssueCommentCreated = {
40
40
action : 'created' ;
41
41
issue : GitHubIssue ;
42
- comment : GithubComment ;
42
+ comment : GitHubComment ;
43
43
} ;
44
44
export type GitHubEventPullRequestCommentCreated = {
45
45
action : 'created' ;
46
46
issue : GitHubPullRequest ;
47
- comment : GithubComment ;
47
+ comment : GitHubComment ;
48
48
} ;
49
+ /**
50
+ * Minimal pull request representation for review events.
51
+ */
52
+ export type GitHubPullRequestMinimal = Pick < GitHubPullRequest , 'number' | 'title' | 'body' > ;
53
+
54
+ /**
55
+ * GitHub pull request review comment payload.
56
+ */
57
+ export type GitHubReviewComment = {
58
+ id : number ;
59
+ body : string ;
60
+ path : string ;
61
+ in_reply_to_id ?: number ;
62
+ position ?: number ;
63
+ line ?: number ;
64
+ } ;
65
+
49
66
export type GitHubEventPullRequestReviewCommentCreated = {
50
67
action : 'created' ;
51
- pull_request : { number : number ; title ?: string ; body ?: string } ;
52
- comment : {
53
- id : number ;
54
- body : string ;
55
- path : string ;
56
- in_reply_to_id ?: number ;
57
- position ?: number ;
58
- line ?: number ;
59
- } ;
68
+ pull_request : GitHubPullRequestMinimal ;
69
+ comment : GitHubReviewComment ;
60
70
} ;
61
71
export type GitHubEventIssuesAssigned = {
62
72
action : 'assigned' ;
@@ -72,7 +82,10 @@ export type GitHubEventPullRequestSynchronize = {
72
82
pull_request : GitHubPullRequest ;
73
83
} ;
74
84
75
- export type GithubComment = { id : number ; body : string } ;
85
+ /**
86
+ * Basic GitHub issue or pull request comment.
87
+ */
88
+ export type GitHubComment = { id : number ; body : string } ;
76
89
export type GitHubIssue = {
77
90
number : number ;
78
91
title : string ;
@@ -89,7 +102,7 @@ export type GitHubPullRequest = {
89
102
/**
90
103
* Content and comments data for issues and pull requests.
91
104
*/
92
- export type GithubContentsData = {
105
+ export type GitHubContentsData = {
93
106
content : { number ?: number ; title : string ; body : string ; login : string } ;
94
107
comments : { body : string ; login : string } [ ] ;
95
108
} ;
0 commit comments