@@ -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,10 @@ export class InBranchFlow extends IntegrationFlow {
5957 }
6058
6159 private configureGit ( ) {
60+ execSync ( `git config --global user.name "${ gitConfig . userName } "` ) ;
61+ execSync ( `git config --global user.email "${ gitConfig . userEmail } "` ) ;
62+ execSync ( `git config --global safe.directory ${ process . cwd ( ) } ` ) ;
63+
6264 const currentAuthor = `${ gitConfig . userName } <${ gitConfig . userEmail } >` ;
6365 const authorOfLastCommit = execSync (
6466 `git log -1 --pretty=format:'%an <%ae>'` ,
@@ -67,10 +69,6 @@ export class InBranchFlow extends IntegrationFlow {
6769 this . ora . fail ( `The action will not run on commits by ${ currentAuthor } ` ) ;
6870 return false ;
6971 }
70-
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