gtx-cli 2.6.19 → 2.6.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# gtx-cli
|
|
2
2
|
|
|
3
|
+
## 2.6.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1019](https://github.com/generaltranslation/gt/pull/1019) [`4dd02f0`](https://github.com/generaltranslation/gt/commit/4dd02f00309bfdbc8a2d49c1d4986ead1f28ac8b) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - fix: default branch fallback
|
|
8
|
+
|
|
3
9
|
## 2.6.19
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "2.6.
|
|
1
|
+
export declare const PACKAGE_VERSION = "2.6.20";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated. Do not edit manually.
|
|
2
|
-
export const PACKAGE_VERSION = '2.6.
|
|
2
|
+
export const PACKAGE_VERSION = '2.6.20';
|
|
@@ -30,7 +30,7 @@ export class BranchStep extends WorkflowStep {
|
|
|
30
30
|
let incoming = [];
|
|
31
31
|
let checkedOut = [];
|
|
32
32
|
let useDefaultBranch = true;
|
|
33
|
-
let autoDetectFailed =
|
|
33
|
+
let autoDetectFailed = !this.settings.branchOptions.autoDetectBranches;
|
|
34
34
|
if (this.settings.branchOptions.enabled &&
|
|
35
35
|
this.settings.branchOptions.autoDetectBranches) {
|
|
36
36
|
const [currentResult, incomingResult, checkedOutResult] = await Promise.all([
|
|
@@ -53,9 +53,6 @@ export class BranchStep extends WorkflowStep {
|
|
|
53
53
|
if (current) {
|
|
54
54
|
useDefaultBranch = false;
|
|
55
55
|
}
|
|
56
|
-
else {
|
|
57
|
-
logger.warn('Branch auto-detection failed. Falling back to the default branch. Use --branch to specify a branch manually.');
|
|
58
|
-
}
|
|
59
56
|
}
|
|
60
57
|
if (this.settings.branchOptions.enabled &&
|
|
61
58
|
this.settings.branchOptions.currentBranch) {
|
|
@@ -73,6 +70,9 @@ export class BranchStep extends WorkflowStep {
|
|
|
73
70
|
],
|
|
74
71
|
});
|
|
75
72
|
if (useDefaultBranch) {
|
|
73
|
+
if (autoDetectFailed) {
|
|
74
|
+
logger.warn('Branch auto-detection failed. Falling back to the default branch. Use --branch to specify a branch manually.');
|
|
75
|
+
}
|
|
76
76
|
if (!branchData.defaultBranch) {
|
|
77
77
|
const createBranchResult = await this.gt.createBranch({
|
|
78
78
|
branchName: 'main', // name doesn't matter for default branch
|
|
@@ -144,12 +144,8 @@ export class BranchStep extends WorkflowStep {
|
|
|
144
144
|
}
|
|
145
145
|
})
|
|
146
146
|
.filter((b) => b !== null)[0] ?? null;
|
|
147
|
-
//
|
|
148
|
-
if (
|
|
149
|
-
(!this.settings.branchOptions.autoDetectBranches || autoDetectFailed) &&
|
|
150
|
-
!this.branchData.checkedOutBranch &&
|
|
151
|
-
branchData.defaultBranch &&
|
|
152
|
-
this.branchData.currentBranch.id !== branchData.defaultBranch.id) {
|
|
147
|
+
// ALWAYS fallback to default branch for checked out branch (to avoid retranslation)
|
|
148
|
+
if (!this.branchData.checkedOutBranch && branchData.defaultBranch) {
|
|
153
149
|
this.branchData.checkedOutBranch = branchData.defaultBranch;
|
|
154
150
|
}
|
|
155
151
|
this.spinner.stop(chalk.green('Branch information resolved successfully'));
|