From cd1234b422647114c25cec7927f5add1430912ee Mon Sep 17 00:00:00 2001 From: Don Kendall Date: Wed, 25 Mar 2026 08:34:37 -0400 Subject: [PATCH] fix(github): apply guest token to images in markdown sync (#10659) * fix(github): apply guest token to images in markdown sync (#10516) The appendGuestLinkToImage function existed but was never called from getMarkdown(). Add it as the default preprocessor so image URLs include a guest JWT token, allowing them to render on GitHub. Signed-off-by: Daniel Kendall Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Don Kendall * fix: formatting (prettier/eslint) Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Don Kendall --------- Signed-off-by: Don Kendall Co-authored-by: Claude Opus 4.6 (1M context) --- services/github/pod-github/src/sync/issues.ts | 4 +--- services/github/pod-github/src/worker.ts | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/services/github/pod-github/src/sync/issues.ts b/services/github/pod-github/src/sync/issues.ts index 074640f68e..6e533268ad 100644 --- a/services/github/pod-github/src/sync/issues.ts +++ b/services/github/pod-github/src/sync/issues.ts @@ -523,9 +523,7 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan info.repository as Ref, container.project, taskTypes[0]._id, - repo as GithubIntegrationRepository & { - repository: IntegrationRepositoryData - }, + repo, !markdownCompatible ) }, diff --git a/services/github/pod-github/src/worker.ts b/services/github/pod-github/src/worker.ts index 7f6c7e82fb..244de40828 100644 --- a/services/github/pod-github/src/worker.ts +++ b/services/github/pod-github/src/worker.ts @@ -86,6 +86,7 @@ import { ReviewCommentSyncManager } from './sync/reviewComments' import { ReviewThreadSyncManager } from './sync/reviewThreads' import { ReviewSyncManager } from './sync/reviews' import { UsersSyncManager, fetchViewerDetails } from './sync/users' +import { appendGuestLinkToImage } from './sync/guest' import { errorToObj } from './sync/utils' import { ContainerFocus, @@ -243,7 +244,10 @@ export class GithubWorker implements IntegrationManager { concatLink(this.getBranding()?.front ?? config.FrontURL, `/browse/?workspace=${this.workspace.uuid}`), // TODO storage URL concatLink(this.getBranding()?.front ?? config.FrontURL, `/files/${this.workspace.uuid}/`), - preprocessor + preprocessor ?? + (async (nodes) => { + appendGuestLinkToImage(nodes, this.workspace.uuid) + }) ) }