Skip to content

Commit 9c4f8f6

Browse files
authored
fix #65 gtg start typo
* fix #65 gtg start typo * 🔧 general: Fix linting with prettier Co-authored-by: Anshul Saha <sheldor1510> Co-authored-by: sheldor1510 <[email protected]>
1 parent 4c5389f commit 9c4f8f6

File tree

4 files changed

+25
-23
lines changed

4 files changed

+25
-23
lines changed

.gitgo

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
{
22
"current_issue": {
3-
"number": "62",
3+
"number": "",
44
"labels": [
5-
"bug"
5+
""
66
],
7-
"title": "Add (y/N) input checks"
7+
"title": ""
88
},
99
"commit_guidelines": [
10-
"cli: ",
11-
" general: "
10+
"fix #"
1211
],
13-
"custom_guidelines": true,
14-
"selected_commit_type": "✨ Adding a new user-facing feature",
12+
"custom_guidelines": false,
13+
"selected_commit_type": "",
1514
"emojis": {
1615
"initial_commit": "tada",
1716
"feature": "sparkles",
@@ -30,12 +29,12 @@
3029
"wip": "construction"
3130
},
3231
"existing_branches": [
33-
"main"
32+
""
3433
],
3534
"current_branch": [
36-
"input-checks"
35+
""
3736
],
3837
"current_commit_message": "",
3938
"use_emojis": true,
40-
"commit_config": true
39+
"commit_config": false
4140
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Before setting up the project, [download and install Node.js](https://nodejs.org
9191
After cloning the project, you need to execute the following commands to install and work on the project locally:
9292

9393
```bash
94-
# This will install alll the needed dependencies
94+
# This will install all the needed dependencies
9595
npm install
9696

9797
# This will install the project from source locally in your system

bin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ program
303303
console.log(chalk.green("\ngtg display:\n"));
304304
console.log(
305305
`Use this to view the suggested branch name and commit title. You can also edit the suggested text based on your preference. This command should be run after ${chalk.yellow(
306-
"gg start"
306+
"gtg start"
307307
)}.\n`
308308
);
309309
console.log(chalk.green("\ngtg checkout:\n"));

lib/inquirer.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,11 @@ module.exports = {
108108
])
109109
.then((ans2) => {
110110
var emo = true;
111-
if (ans2["emojis"] === "y" || ans2["emojis"] === "Y") {
111+
if (ans2["emojis"] === "y" || "Y") {
112112
console.log(
113113
"\nWe have an awesome set of emojis in the .gitgo file which will be suggested to you in the commit messages.\n"
114114
);
115-
} else if (
116-
ans2["emojis"] === "n" ||
117-
ans2["emojis"] === "N" ||
118-
ans2["emojis"] === ""
119-
) {
115+
} else if (ans2["emojis"] === "n" || "N" || "") {
120116
emo = false;
121117
} else {
122118
console.log(
@@ -143,7 +139,7 @@ module.exports = {
143139
});
144140
console.log(
145141
`\nSettings for your repo have been stored. Run ${chalk.yellow(
146-
"gg start"
142+
"gtg start"
147143
)} before working on an issue to get the branch name and commit title automatically. If you would like to change any settings manually, please edit the .gitgo file.\n`
148144
);
149145
});
@@ -166,18 +162,25 @@ module.exports = {
166162
// expects issue number as response
167163
type: "string",
168164
message:
169-
"Would you be using emojis in your commit messages?(y/n)",
165+
"Would you be using emojis in your commit messages?(y/N)",
170166
name: "emojis",
171167
},
172168
])
173169
.then((ans2) => {
174170
var emo = true;
175-
if (ans2["emojis"] === "y") {
171+
if (ans2["emojis"] === "y" || "Y") {
176172
console.log(
177173
"\nWe have an awesome set of emojis in the .gitgo file which will be suggested to you in the commit messages.\n"
178174
);
179-
} else {
175+
} else if (ans2["emojis"] === "n" || "N" || "") {
180176
emo = false;
177+
} else {
178+
console.log(
179+
`We don't know what you mean by "${
180+
ans2["emojis"]
181+
}" ${emoji.get(":cry:")}`
182+
);
183+
exit();
181184
}
182185
reader.jsonReader("./.gitgo", (err, conf) => {
183186
if (err) {
@@ -196,7 +199,7 @@ module.exports = {
196199
});
197200
console.log(
198201
`\nSettings for your repo have been stored. Run ${chalk.yellow(
199-
"gg start"
202+
"gtg start"
200203
)} before working on an issue to get the branch name and commit title automatically. If you would like to change any settings manually, please edit the .gitgo file.\n`
201204
);
202205
});

0 commit comments

Comments
 (0)