UBERF-9634 Handle unsupported markdown in github integration (port to develop) (#8260)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2025-03-18 19:20:24 +07:00
committed by GitHub
parent 31b54bb039
commit 6f63a407dd
21 changed files with 203 additions and 45 deletions
@@ -245,7 +245,7 @@ export class ReviewCommentSyncManager implements DocSyncManager {
)
if (reviewObj !== undefined) {
const lastModified = Date.now()
const body = await this.provider.getMarkup(integration, event.comment.body)
const body = await this.provider.getMarkupSafe(integration, event.comment.body)
await derivedClient.diffUpdate(
reviewData,
{
@@ -343,7 +343,7 @@ export class ReviewCommentSyncManager implements DocSyncManager {
}
const messageData: ReviewCommentData = {
body: await this.provider.getMarkup(container.container, reviewComment.body),
body: await this.provider.getMarkupSafe(container.container, reviewComment.body),
diffHunk: reviewComment.diffHunk,
isMinimized: reviewComment.isMinimized,
reviewUrl: reviewComment.pullRequestReview.url,
@@ -414,7 +414,7 @@ export class ReviewCommentSyncManager implements DocSyncManager {
if (Object.keys(platformUpdate).length > 0) {
if (platformUpdate.body !== undefined) {
const body = await this.provider.getMarkup(container.container, platformUpdate.body)
const body = await this.provider.getMarkupSafe(container.container, platformUpdate.body)
const okit = (await this.provider.getOctokit(account)) ?? container.container.octokit
const q = `mutation updateReviewComment($commentID: ID!, $body: String!) {
updatePullRequestReviewComment(input: {