vtasks-automate-cli 0.9.6 → 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.
Files changed (2) hide show
  1. package/content/index.js +18 -5
  2. package/package.json +1 -1
package/content/index.js CHANGED
@@ -85,10 +85,23 @@ class GitService {
85
85
 
86
86
  async function main() {
87
87
  console.log(LOG_COLORS.BLUE, "Checking vTasks config:");
88
- // if (!config) {
89
- // console.log(LOG_COLORS.RED, "Git user email not found");
90
- // throw new Error("Missing config.js file");
91
- // }
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
+
92
105
  const userEmail = await GitService.getCurrentUser();
93
106
  if (!userEmail) {
94
107
  console.log(LOG_COLORS.RED, "Git user email not found");
@@ -102,7 +115,7 @@ async function main() {
102
115
  }
103
116
  console.log(LOG_COLORS.GREEN, `Project: ${projectName}`);
104
117
  let issueNumber;
105
- const branch = await GitService.getCurrentBranch();
118
+
106
119
  if (branch != "qa" && branch != "dev" && branch != "master") {
107
120
  issueNumber = Number(branch.split("_")[0]);
108
121
  console.log(LOG_COLORS.GREEN, `Currently working on issue: ${issueNumber}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vtasks-automate-cli",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Automate your vTasks workflow with ease — move tasks between states without opening the app",
5
5
  "bin": {
6
6
  "vtasks-automate": "init.js"