mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 00:02:56 +00:00
chore: update oxlint and oxfmt (#17150)
This commit is contained in:
@@ -149,19 +149,17 @@ export async function getPRComments(
|
||||
if (!pullRequest) {
|
||||
console.warn('Review threads response missing pullRequest; keeping REST results')
|
||||
}
|
||||
const graphQLIssueComments = (pullRequest?.comments?.nodes ?? []).map(
|
||||
(c): PRComment => ({
|
||||
id: c.databaseId,
|
||||
author: c.author?.login ?? 'ghost',
|
||||
authorAvatarUrl: c.author?.avatarUrl ?? '',
|
||||
body: c.body ?? '',
|
||||
createdAt: c.createdAt,
|
||||
url: c.url,
|
||||
isBot: c.author?.__typename === 'Bot',
|
||||
reactionSubjectId: c.id,
|
||||
reactions: mapGraphQLReactionGroups(c.reactionGroups)
|
||||
})
|
||||
)
|
||||
const graphQLIssueComments = (pullRequest?.comments?.nodes ?? []).map((c): PRComment => ({
|
||||
id: c.databaseId,
|
||||
author: c.author?.login ?? 'ghost',
|
||||
authorAvatarUrl: c.author?.avatarUrl ?? '',
|
||||
body: c.body ?? '',
|
||||
createdAt: c.createdAt,
|
||||
url: c.url,
|
||||
isBot: c.author?.__typename === 'Bot',
|
||||
reactionSubjectId: c.id,
|
||||
reactions: mapGraphQLReactionGroups(c.reactionGroups)
|
||||
}))
|
||||
if (graphQLIssueComments.length > 0) {
|
||||
issueComments = graphQLIssueComments
|
||||
}
|
||||
@@ -169,19 +167,17 @@ export async function getPRComments(
|
||||
graphQLReviewSummaries = pullRequest
|
||||
? (pullRequest.reviews?.nodes ?? [])
|
||||
.filter((review) => review.body?.trim())
|
||||
.map(
|
||||
(review): PRComment => ({
|
||||
id: review.databaseId,
|
||||
author: review.author?.login ?? 'ghost',
|
||||
authorAvatarUrl: review.author?.avatarUrl ?? '',
|
||||
body: review.body,
|
||||
createdAt: review.createdAt,
|
||||
url: review.url,
|
||||
isBot: review.author?.__typename === 'Bot',
|
||||
reactionSubjectId: review.id,
|
||||
reactions: mapGraphQLReactionGroups(review.reactionGroups)
|
||||
})
|
||||
)
|
||||
.map((review): PRComment => ({
|
||||
id: review.databaseId,
|
||||
author: review.author?.login ?? 'ghost',
|
||||
authorAvatarUrl: review.author?.avatarUrl ?? '',
|
||||
body: review.body,
|
||||
createdAt: review.createdAt,
|
||||
url: review.url,
|
||||
isBot: review.author?.__typename === 'Bot',
|
||||
reactionSubjectId: review.id,
|
||||
reactions: mapGraphQLReactionGroups(review.reactionGroups)
|
||||
}))
|
||||
: undefined
|
||||
|
||||
const threads = pullRequest?.reviewThreads?.nodes ?? []
|
||||
@@ -228,17 +224,15 @@ export async function getPRComments(
|
||||
} else if (reviewsResult.status === 'fulfilled') {
|
||||
reviewSummaries = (JSON.parse(reviewsResult.value.stdout) as RESTReview[])
|
||||
.filter((r) => r.body?.trim())
|
||||
.map(
|
||||
(r): PRComment => ({
|
||||
id: r.id,
|
||||
author: r.user?.login ?? 'ghost',
|
||||
authorAvatarUrl: r.user?.avatar_url ?? '',
|
||||
body: r.body,
|
||||
createdAt: r.submitted_at,
|
||||
url: r.html_url,
|
||||
isBot: r.user?.type === 'Bot'
|
||||
})
|
||||
)
|
||||
.map((r): PRComment => ({
|
||||
id: r.id,
|
||||
author: r.user?.login ?? 'ghost',
|
||||
authorAvatarUrl: r.user?.avatar_url ?? '',
|
||||
body: r.body,
|
||||
createdAt: r.submitted_at,
|
||||
url: r.html_url,
|
||||
isBot: r.user?.type === 'Bot'
|
||||
}))
|
||||
} else {
|
||||
console.warn('Failed to fetch review summaries:', reviewsResult.reason)
|
||||
}
|
||||
|
||||
@@ -238,16 +238,14 @@ export async function getIssueBodyAndComments(
|
||||
}[]
|
||||
assignees?: { login: string }[]
|
||||
}
|
||||
const comments = (data.comments ?? []).map(
|
||||
(comment, index): PRComment => ({
|
||||
id: index,
|
||||
author: comment.author?.login ?? 'ghost',
|
||||
authorAvatarUrl: '',
|
||||
body: comment.body ?? '',
|
||||
createdAt: comment.createdAt,
|
||||
url: comment.url ?? ''
|
||||
})
|
||||
)
|
||||
const comments = (data.comments ?? []).map((comment, index): PRComment => ({
|
||||
id: index,
|
||||
author: comment.author?.login ?? 'ghost',
|
||||
authorAvatarUrl: '',
|
||||
body: comment.body ?? '',
|
||||
createdAt: comment.createdAt,
|
||||
url: comment.url ?? ''
|
||||
}))
|
||||
return {
|
||||
body: data.body ?? '',
|
||||
comments,
|
||||
|
||||
Reference in New Issue
Block a user