Skip to content

Commit

Permalink
fix #65 gtg start typo
Browse files Browse the repository at this point in the history
* fix #65 gtg start typo

* 🔧 general: Fix linting with prettier

Co-authored-by: Anshul Saha <sheldor1510>
Co-authored-by: sheldor1510 <[email protected]>
  • Loading branch information
sheldor1510 and sheldor1510 authored Dec 8, 2020
1 parent 4c5389f commit 9c4f8f6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
19 changes: 9 additions & 10 deletions .gitgo
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{
"current_issue": {
"number": "62",
"number": "",
"labels": [
"bug"
""
],
"title": "Add (y/N) input checks"
"title": ""
},
"commit_guidelines": [
"cli: ",
" general: "
"fix #"
],
"custom_guidelines": true,
"selected_commit_type": "✨ Adding a new user-facing feature",
"custom_guidelines": false,
"selected_commit_type": "",
"emojis": {
"initial_commit": "tada",
"feature": "sparkles",
Expand All @@ -30,12 +29,12 @@
"wip": "construction"
},
"existing_branches": [
"main"
""
],
"current_branch": [
"input-checks"
""
],
"current_commit_message": "",
"use_emojis": true,
"commit_config": true
"commit_config": false
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Before setting up the project, [download and install Node.js](https://nodejs.org
After cloning the project, you need to execute the following commands to install and work on the project locally:

```bash
# This will install alll the needed dependencies
# This will install all the needed dependencies
npm install

# This will install the project from source locally in your system
Expand Down
2 changes: 1 addition & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ program
console.log(chalk.green("\ngtg display:\n"));
console.log(
`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(
"gg start"
"gtg start"
)}.\n`
);
console.log(chalk.green("\ngtg checkout:\n"));
Expand Down
25 changes: 14 additions & 11 deletions lib/inquirer.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,11 @@ module.exports = {
])
.then((ans2) => {
var emo = true;
if (ans2["emojis"] === "y" || ans2["emojis"] === "Y") {
if (ans2["emojis"] === "y" || "Y") {
console.log(
"\nWe have an awesome set of emojis in the .gitgo file which will be suggested to you in the commit messages.\n"
);
} else if (
ans2["emojis"] === "n" ||
ans2["emojis"] === "N" ||
ans2["emojis"] === ""
) {
} else if (ans2["emojis"] === "n" || "N" || "") {
emo = false;
} else {
console.log(
Expand All @@ -143,7 +139,7 @@ module.exports = {
});
console.log(
`\nSettings for your repo have been stored. Run ${chalk.yellow(
"gg start"
"gtg start"
)} 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`
);
});
Expand All @@ -166,18 +162,25 @@ module.exports = {
// expects issue number as response
type: "string",
message:
"Would you be using emojis in your commit messages?(y/n)",
"Would you be using emojis in your commit messages?(y/N)",
name: "emojis",
},
])
.then((ans2) => {
var emo = true;
if (ans2["emojis"] === "y") {
if (ans2["emojis"] === "y" || "Y") {
console.log(
"\nWe have an awesome set of emojis in the .gitgo file which will be suggested to you in the commit messages.\n"
);
} else {
} else if (ans2["emojis"] === "n" || "N" || "") {
emo = false;
} else {
console.log(
`We don't know what you mean by "${
ans2["emojis"]
}" ${emoji.get(":cry:")}`
);
exit();
}
reader.jsonReader("./.gitgo", (err, conf) => {
if (err) {
Expand All @@ -196,7 +199,7 @@ module.exports = {
});
console.log(
`\nSettings for your repo have been stored. Run ${chalk.yellow(
"gg start"
"gtg start"
)} 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`
);
});
Expand Down

0 comments on commit 9c4f8f6

Please sign in to comment.