Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: GitLab merge request images and videos load in private projects #23501

OpenRasalas(GitHub profile, opens in a new tab)wants to merge 8 commits intomain fromrefs/pull/23501/headopened View on GitHub

Showing 21 changed files with 46 additions and 9 deletions (loading 18).

x
0 of 21 viewed, 21 left
13 additions and 8 deletionsapps/mobile/src/features/pull-requests/PullRequestMarkdown.tsxModified
View file
@@ -45,7 +45,10 @@
);
const LineBreaksContext = createContext(false);
const GithubEmojiContext = createContext(false);
-const ChangeRequestUrlContext = createContext<string | null>(null);
+const ChangeRequestContext = createContext<{
+ readonly provider: string;
+ readonly url: string;
+} | null>(null);
​
export function PullRequestMarkdownRepository(props: {
/** The change request the markdown belongs to, whose host decides what its text links. */
@@ -73,9 +76,11 @@
<AutolinksContext value={autolinks}>
<GithubEmojiContext value={provider === "github"}>
<LineBreaksContext value={lineBreaks}>
- <ChangeRequestUrlContext value={url ?? null}>
+ <ChangeRequestContext
+ value={provider === undefined || url === undefined ? null : { provider, url }}
+ >
<PullRequestMediaContext value={media}>{props.children}</PullRequestMediaContext>
- </ChangeRequestUrlContext>
+ </ChangeRequestContext>
</LineBreaksContext>
</GithubEmojiContext>
</AutolinksContext>
@@ -124,7 +129,7 @@
}) => boolean;