From ba0392f3f833de8674dde82bf0b34d56e3d93b1a Mon Sep 17 00:00:00 2001 From: Seung Park Date: Tue, 7 Jan 2025 09:44:39 -0500 Subject: [PATCH 1/4] return branch info for offline download url --- src/services/pool.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/services/pool.ts b/src/services/pool.ts index 81b4a51..81bac6d 100644 --- a/src/services/pool.ts +++ b/src/services/pool.ts @@ -18,6 +18,7 @@ interface BranchEntry { urlAliases: string[]; isStableBranch: boolean; versionSelectorLabel: string; + offlineUrl?: string; [key: string]: any; } @@ -107,6 +108,8 @@ export const findAllRepos = async (options: FindOptions = {}, reqId?: string) => }, }, ]; + console.log('check findOptions '); + console.log(findOptions); const cursor = await db.collection(REPOS_COLLECTION).aggregate(pipeline, findOptions); const res = await cursor.toArray(); return res.map((element) => { @@ -140,6 +143,7 @@ const mapBranches = (branches: BranchEntry[], fullBaseUrl: string) => { fullUrl: getBranchFullUrl(branchEntry, fullBaseUrl, branches.length > 1), label: branchEntry.versionSelectorLabel, isStableBranch: !!branchEntry.isStableBranch, + offlineUrl: branchEntry.offlineUrl, })); }; From 7e5478f46a05de58034bfd3d88b81cbe20559017 Mon Sep 17 00:00:00 2001 From: Seung Park Date: Tue, 7 Jan 2025 09:45:50 -0500 Subject: [PATCH 2/4] remove logs --- src/services/pool.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/services/pool.ts b/src/services/pool.ts index 81bac6d..ba48557 100644 --- a/src/services/pool.ts +++ b/src/services/pool.ts @@ -108,8 +108,6 @@ export const findAllRepos = async (options: FindOptions = {}, reqId?: string) => }, }, ]; - console.log('check findOptions '); - console.log(findOptions); const cursor = await db.collection(REPOS_COLLECTION).aggregate(pipeline, findOptions); const res = await cursor.toArray(); return res.map((element) => { From bb88d9114da667180fe1e54d3d63d306154f22b6 Mon Sep 17 00:00:00 2001 From: Seung Park Date: Tue, 7 Jan 2025 09:50:16 -0500 Subject: [PATCH 3/4] explicitly add url slug as string to branch entry --- src/services/pool.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/pool.ts b/src/services/pool.ts index ba48557..a2ef3f9 100644 --- a/src/services/pool.ts +++ b/src/services/pool.ts @@ -18,6 +18,7 @@ interface BranchEntry { urlAliases: string[]; isStableBranch: boolean; versionSelectorLabel: string; + urlSlug: string; offlineUrl?: string; [key: string]: any; } From d69a8cbb1a73ba73d217d7cb4fc1910367a3dca4 Mon Sep 17 00:00:00 2001 From: Seung Park Date: Tue, 7 Jan 2025 10:06:30 -0500 Subject: [PATCH 4/4] lock ubuntu version --- .github/pull_request_template.md | 2 -- .github/workflows/test.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2e68fe0..5d539e7 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,8 +4,6 @@ DOP-NNNN ### Notes - - ### README updates - - [ ] This PR introduces changes that should be reflected in the README, and I have made those updates. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e8a7d5..a5a4253 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ on: jobs: lint-and-test: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3