- introduce proper configuration for fetchReviews

- drop no longer needed limiting of PRs
- retrieve state from PR review comment
This commit is contained in:
Mike Penz
2022-12-09 13:29:06 +00:00
committed by GitHub
parent 2fe056f840
commit 24f4e30f9f
12 changed files with 81 additions and 40 deletions
+12 -1
View File
@@ -31,6 +31,16 @@ export interface CommentInfo {
submittedAt: moment.Moment | undefined
author: string
body: string
state: string | undefined
}
export const EMPTY_COMMENT_INFO: CommentInfo = {
id: 0,
htmlURL: '',
submittedAt: undefined,
author: '',
body: '',
state: undefined
}
type PullData = RestEndpointMethodTypes['pulls']['get']['response']['data']
@@ -251,5 +261,6 @@ const mapComment = (comment: Unpacked<PullReviewsData>): CommentInfo => ({
htmlURL: comment.html_url,
submittedAt: comment.submitted_at ? moment(comment.submitted_at) : undefined,
author: comment.user?.login || '',
body: comment.body
body: comment.body,
state: comment.state
})