Skip to content

Commit 6527ea7

Browse files
committed
fix: repo mismatch issue on proxy start
1 parent 85e418f commit 6527ea7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/proxy/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default class Proxy {
5151
const allowedList: Repo[] = await getRepos();
5252

5353
defaultAuthorisedRepoList.forEach(async (x) => {
54-
const found = allowedList.find((y) => y.project === x.project && x.name === y.name);
54+
const found = allowedList.find((y) => y.url === x.url);
5555
if (!found) {
5656
const repo = await createRepo(x);
5757
await addUserCanPush(repo._id!, 'admin');

test/testProxyRoute.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Proxy from '../src/proxy';
1818
const TEST_DEFAULT_REPO = {
1919
url: 'https://github.com/finos/git-proxy.git',
2020
name: 'git-proxy',
21-
project: 'finos/git-proxy',
21+
project: 'finos',
2222
host: 'github.com',
2323
proxyUrlPrefix: '/github.com/finos/git-proxy.git',
2424
};

0 commit comments

Comments
 (0)