Skip to content

🎥 Make videos programmatically with React

Update get-git-menu-item.ts

Jonny Burger7cc0bb0db698
diff --git a/packages/studio/src/helpers/get-git-menu-item.ts b/packages/studio/src/helpers/get-git-menu-item.ts
index 9a98067f85..f50bbcb85f 100644
--- a/packages/studio/src/helpers/get-git-menu-item.ts
+++ b/packages/studio/src/helpers/get-git-menu-item.ts
@@ -12,7 +12,11 @@ export const getGitSourceName = (gitSource: GitSource) => {
export const getGitSourceBranchUrl = (gitSource: GitSource) => {
if (gitSource.type === 'github') {
- return `https://github.com/${gitSource.org}/${gitSource.name}/tree/${gitSource.ref}`;
+ return `https://github.com/${gitSource.org}/${gitSource.name}/tree/${
+ gitSource.ref
+ }${
+ gitSource.relativeFromGitRoot ? `/${gitSource.relativeFromGitRoot}` : ''
+ }`;
}
throw new Error('Unknown git source type');