Skip to content

Commit

Permalink
fix: ts stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
maxprilutskiy committed Nov 15, 2024
1 parent 17a7cbf commit 3661687
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions action/src/flows/pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ export class PullRequestFlow extends InBranchFlow {
execSync(`git fetch origin ${this.config.baseBranchName}`, { stdio: 'inherit' });

// Get list of files
const sourceFiles = ['i18n.json'];
const generatedFiles = new Set(['i18n.lock']); // Files generated by Replexica
const sourceFiles: string[] = ['i18n.json'];
const generatedFiles: string[] = ['i18n.lock'];

try {
// Source files (sync from main)
Expand All @@ -166,7 +166,7 @@ export class PullRequestFlow extends InBranchFlow {
const replexicaTargetFiles = execSync('npx replexica@latest show files --target', { encoding: 'utf8' })
.split('\n')
.filter(Boolean);
replexicaTargetFiles.forEach(f => generatedFiles.add(f));
generatedFiles.push(...replexicaTargetFiles);
} catch (error) {
this.ora.warn('Could not get Replexica files list, syncing only i18n.json');
}
Expand Down Expand Up @@ -203,7 +203,7 @@ export class PullRequestFlow extends InBranchFlow {
// Create commit if there are changes
const hasChanges = execSync('git diff --staged --quiet || echo "has_changes"', { encoding: 'utf8' }).includes('has_changes');
if (hasChanges) {
execSync('git commit -m "chore: sync translations from base branch"`, { stdio: 'inherit' });
execSync(`git commit -m "chore: sync @replexica from ${this.config.baseBranchName}"`, { stdio: 'inherit' });
}
}

Expand Down
1 change: 1 addition & 0 deletions action/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"noImplicitAny": false,
"skipDefaultLibCheck": true,
"moduleResolution": "NodeNext",
"module": "NodeNext",
Expand Down

0 comments on commit 3661687

Please sign in to comment.