gtx-cli 2.6.20 → 2.6.21
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,14 @@
|
|
|
1
1
|
# gtx-cli
|
|
2
2
|
|
|
3
|
+
## 2.6.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1021](https://github.com/generaltranslation/gt/pull/1021) [`4cbf7da`](https://github.com/generaltranslation/gt/commit/4cbf7da4bb0d202e2b7c8a6995566538b71856e9) Thanks [@brian-lou](https://github.com/brian-lou)! - Use default branch name instead of placeholder
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`9e99e94`](https://github.com/generaltranslation/gt/commit/9e99e945cbf9e31990930e3428468f64d7240da5)]:
|
|
10
|
+
- generaltranslation@8.1.10
|
|
11
|
+
|
|
3
12
|
## 2.6.20
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "2.6.
|
|
1
|
+
export declare const PACKAGE_VERSION = "2.6.21";
|
|
@@ -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.21';
|
|
@@ -30,6 +30,7 @@ export class BranchStep extends WorkflowStep {
|
|
|
30
30
|
let incoming = [];
|
|
31
31
|
let checkedOut = [];
|
|
32
32
|
let useDefaultBranch = true;
|
|
33
|
+
let detectedDefaultBranchName = 'main';
|
|
33
34
|
let autoDetectFailed = !this.settings.branchOptions.autoDetectBranches;
|
|
34
35
|
if (this.settings.branchOptions.enabled &&
|
|
35
36
|
this.settings.branchOptions.autoDetectBranches) {
|
|
@@ -41,6 +42,9 @@ export class BranchStep extends WorkflowStep {
|
|
|
41
42
|
current = currentResult;
|
|
42
43
|
incoming = incomingResult;
|
|
43
44
|
checkedOut = checkedOutResult;
|
|
45
|
+
if (currentResult) {
|
|
46
|
+
detectedDefaultBranchName = currentResult.defaultBranchName;
|
|
47
|
+
}
|
|
44
48
|
// Try env var detection if git commands failed (e.g. Vercel)
|
|
45
49
|
if (!currentResult) {
|
|
46
50
|
autoDetectFailed = true;
|
|
@@ -75,7 +79,7 @@ export class BranchStep extends WorkflowStep {
|
|
|
75
79
|
}
|
|
76
80
|
if (!branchData.defaultBranch) {
|
|
77
81
|
const createBranchResult = await this.gt.createBranch({
|
|
78
|
-
branchName:
|
|
82
|
+
branchName: detectedDefaultBranchName,
|
|
79
83
|
defaultBranch: true,
|
|
80
84
|
});
|
|
81
85
|
this.branchData.currentBranch = createBranchResult.branch;
|
|
@@ -103,7 +107,7 @@ export class BranchStep extends WorkflowStep {
|
|
|
103
107
|
// retry with default branch
|
|
104
108
|
try {
|
|
105
109
|
const createBranchResult = await this.gt.createBranch({
|
|
106
|
-
branchName:
|
|
110
|
+
branchName: detectedDefaultBranchName,
|
|
107
111
|
defaultBranch: true,
|
|
108
112
|
});
|
|
109
113
|
this.branchData.currentBranch = createBranchResult.branch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gtx-cli",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.21",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"bin": "dist/main.js",
|
|
6
6
|
"files": [
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"unified": "^11.0.5",
|
|
111
111
|
"unist-util-visit": "^5.0.0",
|
|
112
112
|
"yaml": "^2.8.0",
|
|
113
|
-
"generaltranslation": "8.1.
|
|
113
|
+
"generaltranslation": "8.1.10"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
116
|
"@babel/types": "^7.28.4",
|