Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(pr): GitCafe attachments render in pull request bodies #31741

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/31741/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 41 additions and 15 deletions (loading 2).

x
0 of 5 viewed, 5 left
16 additions and 4 deletionsapps/mobile/src/features/pull-requests/PullRequestMarkdown.tsxModified
View file
@@ -11,7 +11,10 @@
} from "./PullRequestMedia";
import { videoMimeType } from "@t3tools/shared/video";
import { createContext, useContext, useMemo, useState } from "react";
-import { changeRequestReferenceAutolinker } from "@t3tools/client-runtime/pull-request-markdown";
+import {
+ changeRequestReferenceAutolinker,
+ resolveChangeRequestMediaUrl,
+} from "@t3tools/client-runtime/pull-request-markdown";
import {
sourceControlClients,
type ReferenceAutolink,
@@ -37,6 +40,7 @@
null,
);
const LineBreaksContext = createContext(false);
+const ChangeRequestUrlContext = createContext<string | null>(null);
​
export function PullRequestMarkdownRepository(props: {
/** The change request the markdown belongs to, whose host decides what its text links. */
@@ -63,7 +67,9 @@
return (
<AutolinksContext value={autolinks}>
<LineBreaksContext value={lineBreaks}>
- <PullRequestMediaContext value={media}>{props.children}</PullRequestMediaContext>
+ <ChangeRequestUrlContext value={url ?? null}>
+ <PullRequestMediaContext value={media}>{props.children}</PullRequestMediaContext>
+ </ChangeRequestUrlContext>