From a4c28415eb15530f54b1d5df8c5a9e024c644ba9 Mon Sep 17 00:00:00 2001 From: Rachit Gupta Date: Thu, 26 Nov 2020 14:19:36 +0530 Subject: [PATCH] :pencil: cli: Capitalizing default value on pressing enter --- .gitgo | 71 +++++++++++++++++++++++++++++-------------------- lib/inquirer.js | 12 ++++----- 2 files changed, 48 insertions(+), 35 deletions(-) diff --git a/.gitgo b/.gitgo index 6e6f8a5..775a457 100644 --- a/.gitgo +++ b/.gitgo @@ -1,31 +1,44 @@ { - "current_issue": { - "number": "", - "labels": [], - "title": "" - }, - "commit_guidelines": [], - "custom_guidelines": false, - "selected_commit_type": "", - "emojis": { - "initial_commit": "tada", - "feature": "sparkles", - "ui": "art", - "code_quality": "package", - "performance": "racehorse", - "security": "lock", - "config": "wrench", - "accessibility": "wheelchair", - "dev_tools": "rocket", - "docs": "pencil", - "release": "gem", - "bug_fix": "bug", - "crash": "boom", - "cleanup": "fire", - "wip": "construction" - }, - "existing_branches": [], - "current_branch": "", - "current_commit_message": "", - "use_emojis": false + "current_issue": { + "number": "45", + "labels": [ + "cli", + "command" + ], + "title": "Capitalizing the default value on pressing enter" + }, + "commit_guidelines": [ + "cli: ", + "general:" + ], + "custom_guidelines": true, + "selected_commit_type": "📝 Writing docs", + "emojis": { + "initial_commit": "tada", + "feature": "sparkles", + "ui": "art", + "code_quality": "package", + "performance": "racehorse", + "security": "lock", + "config": "wrench", + "accessibility": "wheelchair", + "dev_tools": "rocket", + "docs": "pencil", + "release": "gem", + "bug_fix": "bug", + "crash": "boom", + "cleanup": "fire", + "wip": "construction" + }, + "existing_branches": [ + "commands", + "fix-commit", + "issuetype-rec", + "main", + "readme", + "recommendation-text-color" + ], + "current_branch": "capitalizing-default-value", + "current_commit_message": ":pencil: cli: Capitalizing default value on pressing enter", + "use_emojis": true } \ No newline at end of file diff --git a/lib/inquirer.js b/lib/inquirer.js index fe811e6..1a8a993 100644 --- a/lib/inquirer.js +++ b/lib/inquirer.js @@ -98,8 +98,8 @@ module.exports = { }) inquirer.prompt([ { - // expects issue number as response - type: 'string', message: 'Would you be using emojis in your commit messages?(y/n)', name: 'emojis' + // expects yes and no as response + type: 'string', message: 'Would you be using emojis in your commit messages?(y/N)', name: 'emojis' } ]).then( ans2 => { @@ -119,7 +119,7 @@ module.exports = { if (err) console.log('Error writing file:', err) }) }) - console.log("\nSettings for your repo have been stored. Run gg 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") + console.log("\nSettings for your repo have been stored. Run gg 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") } ) } @@ -138,8 +138,8 @@ module.exports = { }) inquirer.prompt([ { - // expects issue number as response - type: 'string', message: 'Would you be using emojis in your commit messages?(y/n)', name: 'emojis' + // expects yes and no as response + type: 'string', message: 'Would you be using emojis in your commit messages?(y/N)', name: 'emojis' } ]).then( ans2 => { @@ -159,7 +159,7 @@ module.exports = { if (err) console.log('Error writing file:', err) }) }) - console.log("\nSettings for your repo have been stored. Run gg 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") + console.log("\nSettings for your repo have been stored. Run gg 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") } ) }