File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,21 @@ async function run() {
88 const mode = core . getInput ( 'mode' ) || 'full' ;
99 const dbType = core . getInput ( 'db_type' ) || 'chromadb' ;
1010
11+ let version = "unknown" ;
12+ try {
13+ const fs = require ( 'fs' ) ;
14+ const path = require ( 'path' ) ;
15+ const packageJsonPath = path . resolve ( __dirname , './package.json' ) ;
16+ if ( fs . existsSync ( packageJsonPath ) ) {
17+ const packageData = JSON . parse ( fs . readFileSync ( packageJsonPath , 'utf8' ) ) ;
18+ version = packageData . version || "unknown" ;
19+ }
20+ } catch ( versionError ) {
21+ console . error ( 'Error getting version:' , versionError . message ) ;
22+ }
23+
24+ console . log ( `Vector code map generator v${ version } ` ) ;
25+
1126 // Отримання шляху до репозиторію
1227 const repoPath = process . env . GITHUB_WORKSPACE || '.' ;
1328
Original file line number Diff line number Diff line change 11require ( 'dotenv' ) . config ( ) ;
22const { getDbAdapter } = require ( './src/db' ) ;
33const { scanRepository } = require ( './src/scanners' ) ;
4+ const path = require ( "path" ) ;
5+ const fs = require ( "fs" ) ;
46
57async function localRun ( ) {
68 try {
79 // Отримуємо налаштування з .env
810 const mode = process . env . MODE || 'full' ;
911 const dbType = process . env . DB_TYPE || 'chromadb' ;
1012
13+ let version = "unknown" ;
14+ try {
15+ const fs = require ( 'fs' ) ;
16+ const path = require ( 'path' ) ;
17+ const packageJsonPath = path . resolve ( __dirname , './package.json' ) ;
18+ if ( fs . existsSync ( packageJsonPath ) ) {
19+ const packageData = JSON . parse ( fs . readFileSync ( packageJsonPath , 'utf8' ) ) ;
20+ version = packageData . version || "unknown" ;
21+ }
22+ } catch ( versionError ) {
23+ console . error ( 'Error getting version:' , versionError . message ) ;
24+ }
25+
26+ console . log ( `Vector code map generator v${ version } ` ) ;
27+
1128 // OpenAI налаштування
1229 const openaiApiKey = process . env . OPENAI_API_KEY ;
1330 if ( ! openaiApiKey ) throw new Error ( 'OPENAI_API_KEY not set' ) ;
Original file line number Diff line number Diff line change 1515 " openai" ,
1616 " chromadb"
1717 ],
18- "author" : " Your Organization " ,
18+ "author" : " Octanium91 " ,
1919 "license" : " MIT" ,
2020 "dependencies" : {
2121 "@actions/core" : " ^1.10.0" ,
You can’t perform that action at this time.
0 commit comments