vtasks-automate-cli 0.9.5 → 0.9.7
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/content/index.js +21 -6
- package/package.json +1 -1
package/content/index.js
CHANGED
|
@@ -70,7 +70,9 @@ class GitService {
|
|
|
70
70
|
}
|
|
71
71
|
const split = item.split(" ");
|
|
72
72
|
//Support http and ssh
|
|
73
|
-
const url = split.find(
|
|
73
|
+
const url = split.find(
|
|
74
|
+
(t) => t.includes("http") || t.includes("git@github")
|
|
75
|
+
);
|
|
74
76
|
|
|
75
77
|
const urlSplit = url.split("/");
|
|
76
78
|
const gitfile = urlSplit[urlSplit.length - 1];
|
|
@@ -83,10 +85,23 @@ class GitService {
|
|
|
83
85
|
|
|
84
86
|
async function main() {
|
|
85
87
|
console.log(LOG_COLORS.BLUE, "Checking vTasks config:");
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
const branch = await GitService.getCurrentBranch();
|
|
89
|
+
try {
|
|
90
|
+
if (
|
|
91
|
+
branch.trim() == "qa" ||
|
|
92
|
+
branch.trim() == "dev" ||
|
|
93
|
+
branch.trim() == "master"
|
|
94
|
+
) {
|
|
95
|
+
console.log(
|
|
96
|
+
LOG_COLORS.YELLOW,
|
|
97
|
+
"Non issue branch - Skip checks and movement"
|
|
98
|
+
);
|
|
99
|
+
return process.exit(0);
|
|
100
|
+
}
|
|
101
|
+
} catch (error) {
|
|
102
|
+
console.log(LOG_COLORS.RED, "Error parsing branch", branch);
|
|
103
|
+
}
|
|
104
|
+
|
|
90
105
|
const userEmail = await GitService.getCurrentUser();
|
|
91
106
|
if (!userEmail) {
|
|
92
107
|
console.log(LOG_COLORS.RED, "Git user email not found");
|
|
@@ -100,7 +115,7 @@ async function main() {
|
|
|
100
115
|
}
|
|
101
116
|
console.log(LOG_COLORS.GREEN, `Project: ${projectName}`);
|
|
102
117
|
let issueNumber;
|
|
103
|
-
|
|
118
|
+
|
|
104
119
|
if (branch != "qa" && branch != "dev" && branch != "master") {
|
|
105
120
|
issueNumber = Number(branch.split("_")[0]);
|
|
106
121
|
console.log(LOG_COLORS.GREEN, `Currently working on issue: ${issueNumber}`);
|