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
@@ -220,7 +220,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
const update: IssueUpdate = {}
const du: DocumentUpdate<DocSyncInfo> = {}
if (event.changes.body !== undefined) {
update.description = await this.provider.getMarkup(integration, event.issue.body, this.stripGuestLink)
update.description = await this.provider.getMarkupSafe(integration, event.issue.body, this.stripGuestLink)
du.markdown = await this.provider.getMarkdown(update.description)
}
if (event.changes.title !== undefined) {
@@ -413,7 +413,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
addHulyLink: false, // Do not need, since we create comment on Github about issue is connected.
current: {
title: issueExternal.title,
description: await this.provider.getMarkup(container.container, issueExternal.body, this.stripGuestLink)
description: await this.provider.getMarkupSafe(container.container, issueExternal.body, this.stripGuestLink)
}
}
needCreateConnectedAtHuly = true
@@ -501,7 +501,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
const issueData = {
title: issueExternal.title,
description: await this.provider.getMarkup(container.container, issueExternal.body, this.stripGuestLink),
description: await this.provider.getMarkupSafe(container.container, issueExternal.body, this.stripGuestLink),
assignee: assignees[0]?.person,
repository: info.repository,
remainingTime: 0
@@ -767,7 +767,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan
},
{ url: issueExternal.url, id: existing._id }
)
issueData.description = await this.provider.getMarkup(container.container, body, this.stripGuestLink)
issueData.description = await this.provider.getMarkupSafe(container.container, body, this.stripGuestLink)
} else if (hasFieldStateChanges) {
await this.ctx.withLog(
'==> updateIssue',