fix(git): add more robust error handling for Git operation#579
fix(git): add more robust error handling for Git operation#579mathio merged 2 commits intolingodotdev:mainfrom
Conversation
|
it has some changes of #573 but the bibucet gitconifg methos doesn't include the git command, which can be refactored |
| // Check if PR exists | ||
| this.ora.start( | ||
| `Checking for existing PR with head ${i18nBranchName} and base ${this.platformKit.platformConfig.baseBranchName}`, | ||
| `Checking for existing PR with head ${i18nBranchName} and base ${this.platformKit.platformConfig.baseBranchName}` |
There was a problem hiding this comment.
Thanks for running the prettier!
There was a problem hiding this comment.
Let's not add a new utils file. Parent PlatformKit class has gitConfig() method that can be used for any common logic using super.gitConfig(...)
There was a problem hiding this comment.
Issue #573 mentioned creating a new file, so should I revert the multi-platform refactoring change?
There was a problem hiding this comment.
I am not saying not to do it, just to do it a bit differently than what the issue suggests.
However lets keep the PRs one issue at a time. This looks good now.
| execSync(`git remote set-url origin https://${ghToken}@github.com/${repositoryOwner}/${repositoryName}.git`, { | ||
| stdio: "inherit", | ||
| }); | ||
| const URL = `https://${ghToken}@github.com/${repositoryOwner}/${repositoryName}.git`; |
There was a problem hiding this comment.
Let's use lowercase "url" for variables like this:
| const URL = `https://${ghToken}@github.com/${repositoryOwner}/${repositoryName}.git`; | |
| const url = `https://${ghToken}@github.com/${repositoryOwner}/${repositoryName}.git`; |
Resolves #571