mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-21 20:02:22 +02:00
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:
@@ -211,7 +211,11 @@ export class PullRequestSyncManager extends IssueSyncManagerBase implements DocS
|
||||
update.title = event.pull_request.title
|
||||
}
|
||||
if (event.changes.body !== undefined) {
|
||||
update.description = await this.provider.getMarkup(integration, event.pull_request.body, this.stripGuestLink)
|
||||
update.description = await this.provider.getMarkupSafe(
|
||||
integration,
|
||||
event.pull_request.body,
|
||||
this.stripGuestLink
|
||||
)
|
||||
du.markdown = await this.provider.getMarkdown(update.description)
|
||||
}
|
||||
if (event.changes.base !== undefined) {
|
||||
@@ -464,7 +468,11 @@ export class PullRequestSyncManager extends IssueSyncManagerBase implements DocS
|
||||
}
|
||||
const pullRequestData: GithubPullRequestData = {
|
||||
title: pullRequestExternal.title,
|
||||
description: await this.provider.getMarkup(container.container, pullRequestExternal.body, this.stripGuestLink),
|
||||
description: await this.provider.getMarkupSafe(
|
||||
container.container,
|
||||
pullRequestExternal.body,
|
||||
this.stripGuestLink
|
||||
),
|
||||
assignee: assignees[0]?.person ?? null,
|
||||
reviewers: reviewers.map((it: any) => it.person),
|
||||
draft: pullRequestExternal.isDraft,
|
||||
@@ -1067,7 +1075,7 @@ export class PullRequestSyncManager extends IssueSyncManagerBase implements DocS
|
||||
},
|
||||
{ url: issueExternal.url }
|
||||
)
|
||||
issueData.description = await this.provider.getMarkup(container.container, body, this.stripGuestLink)
|
||||
issueData.description = await this.provider.getMarkupSafe(container.container, body, this.stripGuestLink)
|
||||
} else if (hasFieldsUpdate) {
|
||||
await this.ctx.withLog('==> updatePullRequest:', {}, async () => {
|
||||
this.ctx.info('update-fields', {
|
||||
|
||||
Reference in New Issue
Block a user