Skip to content

Commit aa8a3b2

Browse files
authored
Merge pull request #2072 from appwrite/chore-pass-branch-name-to-get-repo-contents
2 parents 79b58da + 85d3289 commit aa8a3b2

File tree

6 files changed

+20
-11
lines changed

6 files changed

+20
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"dependencies": {
2424
"@ai-sdk/svelte": "^1.1.24",
25-
"@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@56743f5",
25+
"@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@8836b0c",
2626
"@appwrite.io/pink-icons": "0.25.0",
2727
"@appwrite.io/pink-icons-svelte": "^2.0.0-RC.1",
2828
"@appwrite.io/pink-legacy": "^1.0.3",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/components/git/productionBranchFieldset.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@
9090
</Fieldset>
9191

9292
{#if show}
93-
<SelectRootModal bind:show bind:rootDir {product} />
93+
<SelectRootModal bind:show bind:rootDir {product} {branch} />
9494
{/if}

src/lib/components/git/selectRootModal.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
export let show = false;
2323
export let rootDir: string;
2424
export let product: 'sites' | 'functions' = 'functions';
25+
export let branch: string;
2526
2627
let isLoading = true;
2728
let directories: Directory[] = [
@@ -42,7 +43,7 @@
4243
try {
4344
const content = await sdk
4445
.forProject(page.params.region, page.params.project)
45-
.vcs.getRepositoryContents($installation.$id, $repository.id, currentPath);
46+
.vcs.getRepositoryContents($installation.$id, $repository.id, currentPath, branch);
4647
directories[0].fileCount = content.contents?.length ?? 0;
4748
directories[0].children = content.contents
4849
.filter((e) => e.isDirectory)
@@ -82,7 +83,7 @@
8283
try {
8384
const content = await sdk
8485
.forProject(page.params.region, page.params.project)
85-
.vcs.getRepositoryContents($installation.$id, $repository.id, path);
86+
.vcs.getRepositoryContents($installation.$id, $repository.id, path, branch);
8687
8788
const fileCount = content.contents?.length ?? 0;
8889
const contentDirectories = content.contents.filter((e) => e.isDirectory);

src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/updateRepository.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,5 +274,9 @@
274274
<DisconnectRepo bind:show={showDisconnect} on:success={loadRepository} />
275275
{/if}
276276
{#if showSelectRoot}
277-
<SelectRootModal bind:show={showSelectRoot} product="sites" bind:rootDir={selectedDir} />
277+
<SelectRootModal
278+
bind:show={showSelectRoot}
279+
product="sites"
280+
bind:rootDir={selectedDir}
281+
branch={selectedBranch} />
278282
{/if}

src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/updateRepository.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,5 +269,9 @@
269269
{/if}
270270

271271
{#if showSelectRoot}
272-
<SelectRootModal bind:show={showSelectRoot} product="sites" bind:rootDir={selectedDir} />
272+
<SelectRootModal
273+
bind:show={showSelectRoot}
274+
product="sites"
275+
bind:rootDir={selectedDir}
276+
branch={selectedBranch} />
273277
{/if}

0 commit comments

Comments
 (0)