Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(pull-requests): render private GitHub images in PR bodies #9404

ClosedXanacas(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/9404/headopened View on GitHub

Showing 16 changed files with 32 additions and 10 deletions (loading 13).

x
0 of 16 viewed, 16 left
5 additions and 5 deletionsapps/mobile/src/features/threads/ThreadFeed.tsxModified
View file
@@ -2172,11 +2172,11 @@
return (
<ThreadMarkdownImage
environmentId={props.environmentId}
- resource={{
- _tag: "media-file",
- threadId: props.threadId,
- path: imageSource.path,
- }}
+ resource={
+ imageSource._tag === "GitHubAttachment"
+ ? { _tag: "github-attachment", url: imageSource.uri }
+ : { _tag: "media-file", threadId: props.threadId, path: imageSource.path }
+ }
alt={image.alt}
srcFragment={markdownImageSourceFragment(image.href)}
actionsSource={media?.source.actionsSource}
7 additions and 2 deletionsapps/mobile/src/features/threads/ThreadMarkdownImage.tsxModified
View file
@@ -178,7 +178,10 @@
/** Environment-hosted image that loads through a signed asset URL. */
export function ThreadMarkdownImage(props: {
readonly environmentId: EnvironmentId;
- readonly resource: Extract<AssetResource, { readonly _tag: "attachment" | "media-file" }>;
+ readonly resource: Extract<
+ AssetResource,
+ { readonly _tag: "attachment" | "media-file" | "github-attachment" }
+ >;