Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

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

Showing 14 changed files with 69 additions and 18 deletions (loading 11).

x
0 of 14 viewed, 14 left
12 additions and 7 deletionsapps/mobile/src/features/threads/ThreadFeed.tsxModified
View file
@@ -573,7 +573,10 @@
/** Environment-hosted image that loads through a signed asset URL. */
function ThreadMarkdownImage(props: {
readonly environmentId: EnvironmentId;
- readonly resource: Extract<AssetResource, { readonly _tag: "attachment" | "workspace-file" }>;
+ readonly resource: Extract<
+ AssetResource,
+ { readonly _tag: "attachment" | "workspace-file" | "github-attachment" }
+ >;
readonly alt: string | null;
readonly srcFragment?: string;
readonly onPressPreview: (source: FilePreviewSource) => void;
@@ -586,7 +589,9 @@
sourceKey={
props.resource._tag === "attachment"
? `attachment:${props.resource.attachmentId}`
- : `workspace:${props.resource.path}`
+ : props.resource._tag === "github-attachment"
+ ? `github:${props.resource.url}`
+ : `workspace:${props.resource.path}`
unavailable={assetUrl._tag === "Failure"}
alt={props.alt}
@@ -1990,11 +1995,11 @@
return (
<ThreadMarkdownImage
environmentId={props.environmentId}
- resource={{