Skip to content

Commit 2aa4145

Browse files
authored
fix(cli): checkout i18n branch from remote instead of HEAD (#2049)
* fix(cli): checkout i18n branch from remote instead of HEAD * fix(cli): add changeset
1 parent 95e2e28 commit 2aa4145

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/heavy-areas-happen.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"lingo.dev": patch
3+
---
4+
5+
Fixed a bug where the CI pull request flow would ignore the existing translation branch and start from scratch, which could produce duplicate PRs when the original was merged during a concurrent run.

packages/cli/src/cli/cmd/ci/flows/pull-request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class PullRequestFlow extends InBranchFlow {
9999

100100
private checkoutI18nBranch(i18nBranchName: string) {
101101
execSync(`git fetch origin ${i18nBranchName}`, { stdio: "inherit" });
102-
execSync(`git checkout -b ${i18nBranchName}`, {
102+
execSync(`git checkout -b ${i18nBranchName} origin/${i18nBranchName}`, {
103103
stdio: "inherit",
104104
});
105105
}

0 commit comments

Comments
 (0)