File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ async function run() {
77 // Отримуємо налаштування з GitHub Actions
88 const mode = core . getInput ( 'mode' ) || 'full' ;
99 const dbType = core . getInput ( 'db_type' ) || 'chromadb' ;
10+
11+ // Отримання шляху до репозиторію
12+ const repoPath = process . env . GITHUB_WORKSPACE || '.' ;
1013
1114 // OpenAI налаштування
1215 const openaiApiKey = core . getInput ( 'openai_api_key' , { required : true } ) ;
@@ -23,8 +26,8 @@ async function run() {
2326
2427 const { execSync } = require ( 'child_process' ) ;
2528 try {
26- execSync ( 'git config --global --add safe.directory /github/workspace' ) ;
27- console . log ( 'Added /github/workspace as safe directory' ) ;
29+ execSync ( 'git config --global --add safe.directory ' + repoPath ) ;
30+ console . log ( 'Added ' + repoPath + ' as safe directory') ;
2831 } catch ( error ) {
2932 console . error ( 'Failed to configure safe directory:' , error . message ) ;
3033 }
@@ -61,8 +64,6 @@ async function run() {
6164 process . env . MAX_TOKENS_PER_BATCH = MAX_TOKENS_PER_BATCH ;
6265
6366 // Запускаємо сканування репозиторію
64- const repoPath = process . env . GITHUB_WORKSPACE || '.' ;
65-
6667 await scanRepository ( {
6768 repoPath,
6869 dbAdapter,
You can’t perform that action at this time.
0 commit comments