@@ -19,9 +19,6 @@ export class InBranchFlow extends IntegrationFlow {
1919 const hasChanges = this . checkCommitableChanges ( ) ;
2020 this . ora . succeed ( hasChanges ? "Changes detected" : "No changes detected" ) ;
2121
22- execSync ( `git status` , { stdio : "inherit" } ) ;
23- execSync ( `git branch` , { stdio : "inherit" } ) ;
24-
2522 if ( hasChanges ) {
2623 this . ora . start ( "Committing changes" ) ;
2724 execSync ( `git add .` , { stdio : "inherit" } ) ;
@@ -33,10 +30,11 @@ export class InBranchFlow extends IntegrationFlow {
3330 execSync ( `git remote -v` , { stdio : "inherit" } ) ;
3431
3532 this . ora . start ( "Pushing changes to remote" ) ;
36- execSync (
37- `git push origin ${ this . platformKit . platformConfig . baseBranchName } --force` ,
38- { stdio : "inherit" } ,
39- ) ;
33+ const currentBranch =
34+ this . i18nBranchName ?? this . platformKit . platformConfig . baseBranchName ;
35+ execSync ( `git push origin ${ currentBranch } --force` , {
36+ stdio : "inherit" ,
37+ } ) ;
4038 this . ora . succeed ( "Changes pushed to remote" ) ;
4139 }
4240
@@ -59,6 +57,12 @@ export class InBranchFlow extends IntegrationFlow {
5957 }
6058
6159 private configureGit ( ) {
60+ this . platformKit ?. gitConfig ( ) ;
61+
62+ execSync ( `git config --global user.name "${ gitConfig . userName } "` ) ;
63+ execSync ( `git config --global user.email "${ gitConfig . userEmail } "` ) ;
64+ execSync ( `git config --global safe.directory ${ process . cwd ( ) } ` ) ;
65+
6266 const currentAuthor = `${ gitConfig . userName } <${ gitConfig . userEmail } >` ;
6367 const authorOfLastCommit = execSync (
6468 `git log -1 --pretty=format:'%an <%ae>'` ,
@@ -68,11 +72,6 @@ export class InBranchFlow extends IntegrationFlow {
6872 return false ;
6973 }
7074
71- execSync ( `git config --global user.name "${ gitConfig . userName } "` ) ;
72- execSync ( `git config --global user.email "${ gitConfig . userEmail } "` ) ;
73- execSync ( `git config --global safe.directory ${ process . cwd ( ) } ` ) ;
74- this . platformKit ?. gitConfig ( ) ;
75-
7675 return true ;
7776 }
7877}
0 commit comments