@@ -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" } ) ;
@@ -30,13 +27,12 @@ export class InBranchFlow extends IntegrationFlow {
3027 } ) ;
3128 this . ora . succeed ( "Changes committed" ) ;
3229
33- execSync ( `git remote -v` , { stdio : "inherit" } ) ;
34-
3530 this . ora . start ( "Pushing changes to remote" ) ;
36- execSync (
37- `git push origin ${ this . platformKit . platformConfig . baseBranchName } --force` ,
38- { stdio : "inherit" } ,
39- ) ;
31+ const currentBranch =
32+ this . i18nBranchName ?? this . platformKit . platformConfig . baseBranchName ;
33+ execSync ( `git push origin ${ currentBranch } --force` , {
34+ stdio : "inherit" ,
35+ } ) ;
4036 this . ora . succeed ( "Changes pushed to remote" ) ;
4137 }
4238
@@ -59,6 +55,11 @@ export class InBranchFlow extends IntegrationFlow {
5955 }
6056
6157 private configureGit ( ) {
58+ execSync ( `git config --global safe.directory ${ process . cwd ( ) } ` ) ;
59+
60+ execSync ( `git config user.name "${ gitConfig . userName } "` ) ;
61+ execSync ( `git config user.email "${ gitConfig . userEmail } "` ) ;
62+
6263 const currentAuthor = `${ gitConfig . userName } <${ gitConfig . userEmail } >` ;
6364 const authorOfLastCommit = execSync (
6465 `git log -1 --pretty=format:'%an <%ae>'` ,
@@ -68,9 +69,6 @@ export class InBranchFlow extends IntegrationFlow {
6869 return false ;
6970 }
7071
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 ( ) } ` ) ;
7472 this . platformKit ?. gitConfig ( ) ;
7573
7674 return true ;
0 commit comments