Skip to content

Commit 8d330fa

Browse files
authored
Merge pull request #754 from vishnoianil/fix-taxonomy-dir
Fix publishing skill/knowledge to remote repository
2 parents 7d6e142 + 348748d commit 8d330fa

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/app/api/native/git/branches/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ async function handlePublish(branchName: string, localTaxonomyDir: string, remot
244244
return NextResponse.json({ error: 'Invalid contribution name for publish' }, { status: 400 });
245245
}
246246

247-
console.log(`Publishing contribution from ${branchName} to remote taxonomy repo at ${REMOTE_TAXONOMY_ROOT_DIR}/taxonomy`);
247+
console.log(`Publishing contribution from ${branchName} to remote taxonomy repo at ${remoteTaxonomyDir}`);
248248
const changes = await findDiff(branchName, localTaxonomyDir);
249249

250250
// Check if there are any changes to publish, create a new branch at remoteTaxonomyDir and

src/app/api/native/tree/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export async function POST(req: NextRequest) {
1515
const taxonomyRootPath = findTaxonomyRepoPath();
1616
let dirPath = '';
1717
if (root_path === 'skills') {
18-
dirPath = path.join(taxonomyRootPath, 'taxonomy', SKILLS, dir_name);
18+
dirPath = path.join(taxonomyRootPath, SKILLS, dir_name);
1919
} else {
20-
dirPath = path.join(taxonomyRootPath, 'taxonomy', KNOWLEDGE, dir_name);
20+
dirPath = path.join(taxonomyRootPath, KNOWLEDGE, dir_name);
2121
}
2222
const dirs = getFirstLevelDirectories(dirPath);
2323
return NextResponse.json({ data: dirs }, { status: 201 });

src/app/api/native/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ export const findTaxonomyRepoPath = (): string => {
9090
if (remoteTaxonomyRepoDirFinal === '') {
9191
return '';
9292
}
93-
return remoteTaxonomyRepoDirFinal;
93+
return path.join(remoteTaxonomyRepoDirFinal, '/taxonomy');
9494
};

0 commit comments

Comments
 (0)