@@ -19,6 +19,7 @@ import { rimraf } from 'rimraf';
1919export interface ProcessOptions {
2020 skipPush ?: boolean ;
2121 clear ?: boolean ;
22+ secret ?: string ;
2223}
2324
2425interface CommitToProcess {
@@ -63,7 +64,10 @@ export class Processor {
6364 await fs . mkdir ( this . basePath ) ;
6465 }
6566
66- await cloneRepository ( this . repoPaths . config , this . configRepoUrl ) ;
67+ await cloneRepository (
68+ this . repoPaths . config ,
69+ this . configRepoUrl . replace ( '${SECRET}' , this . processOptions . secret ?? '' )
70+ ) ;
6771 await runGitCommand ( this . repoPaths . config , `checkout ${ this . branch } ` ) ;
6872
6973 const configPath = path . join ( this . repoPaths . config , 'config.json' ) ;
@@ -86,9 +90,18 @@ export class Processor {
8690 process . exit ( 1 ) ;
8791 }
8892
89- await cloneRepository ( this . repoPaths . base , this . config ! . repos . base ) ;
90- await cloneRepository ( this . repoPaths . diff , this . config ! . repos . diff ) ;
91- await cloneRepository ( this . repoPaths . merged , this . config ! . repos . merged ) ;
93+ await cloneRepository (
94+ this . repoPaths . base ,
95+ this . config ! . repos . base . replace ( '${SECRET}' , this . processOptions . secret ?? '' )
96+ ) ;
97+ await cloneRepository (
98+ this . repoPaths . diff ,
99+ this . config ! . repos . diff . replace ( '${SECRET}' , this . processOptions . secret ?? '' )
100+ ) ;
101+ await cloneRepository (
102+ this . repoPaths . merged ,
103+ this . config ! . repos . merged . replace ( '${SECRET}' , this . processOptions . secret ?? '' )
104+ ) ;
92105
93106 await runGitCommand ( this . repoPaths . base , `checkout ${ this . branch } ` ) ;
94107 await runGitCommand ( this . repoPaths . diff , `checkout ${ this . branch } ` ) ;
0 commit comments