Skip to content

Commit 4609cf8

Browse files
author
SPRINX0\prochazka
committed
changed config format
1 parent 2ff60e7 commit 4609cf8

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

src/processor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ export class Processor {
9292

9393
await cloneRepository(
9494
this.repoPaths.base,
95-
this.config!.repos.base.replace('DIFLOW_GIT_SECRET', this.processOptions.secret ?? '')
95+
this.config!.repos.base.url.replace('DIFLOW_GIT_SECRET', this.processOptions.secret ?? '')
9696
);
9797
await cloneRepository(
9898
this.repoPaths.diff,
99-
this.config!.repos.diff.replace('DIFLOW_GIT_SECRET', this.processOptions.secret ?? '')
99+
this.config!.repos.diff.url.replace('DIFLOW_GIT_SECRET', this.processOptions.secret ?? '')
100100
);
101101
await cloneRepository(
102102
this.repoPaths.merged,
103-
this.config!.repos.merged.replace('DIFLOW_GIT_SECRET', this.processOptions.secret ?? '')
103+
this.config!.repos.merged.url.replace('DIFLOW_GIT_SECRET', this.processOptions.secret ?? '')
104104
);
105105

106106
await runGitCommand(this.repoPaths.base, `checkout ${this.branch}`);

src/testrepo.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ export async function initTestRepos() {
6767
{
6868
branches: ['master'],
6969
repos: {
70-
base: getTestRepoPath('base'),
71-
diff: getTestRepoPath('diff'),
72-
merged: getTestRepoPath('merged'),
70+
base: { url: getTestRepoPath('base') },
71+
diff: { url: getTestRepoPath('diff') },
72+
merged: { url: getTestRepoPath('merged') },
7373
},
7474
ignorePaths: ['.github/**'],
7575
},

src/types.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
export type RepoId = 'base' | 'diff' | 'merged' | 'config';
22
export type FileAction = 'A' | 'D' | 'M';
33

4+
export interface RepoConfig {
5+
url: string;
6+
}
7+
48
export interface Config {
59
repos: {
6-
base: string;
7-
diff: string;
8-
merged: string;
9-
config: string;
10+
base: RepoConfig;
11+
diff: RepoConfig;
12+
merged: RepoConfig;
1013
};
1114
ignorePaths: string[];
1215
syncCommitPrefix?: string;

0 commit comments

Comments
 (0)