Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions .gitgo
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"current_issue": {
"number": "20",
"number": "51",
"labels": [
"cli",
"command",
"enhancement"
],
"title": "Add branch name & commit message suggestions "
"title": "Add a command to give summary of all instructions"
},
"commit_guidelines": [
"fix:",
" feat:",
" chore:"
"cli:"
],
"custom_guidelines": false,
"selected_commit_type": "🐎 Improving performance",
"custom_guidelines": true,
"selected_commit_type": "✨ Adding a new user-facing feature",
"emojis": {
"initial_commit": "tada",
"feature": "sparkles",
Expand All @@ -32,16 +31,11 @@
"wip": "construction"
},
"existing_branches": [
"issuetype-rec",
"main",
"notice",
"readme"
"main"
],
"current_branch": [
"branch-name",
"branch-name",
"message-suggestions"
"command-summary-instructions"
],
"current_commit_message": "🐎 chore: Add branch name & commit message suggestions ",
"current_commit_message": "✨ cli: Add a command to give summary of all instructions",
"use_emojis": true
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ npm i gitg0

Currently, we have the following 6 commands which will make you **Good To Go**, `gtg`:

### `gtg help`
### `gtg whoami`

As the name suggests this command will help you know what the tool does and how to use the commands right from your terminal.

Expand Down
57 changes: 57 additions & 0 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const {
const simpleGit = require("simple-git");
const git = simpleGit();
const { jsonReader } = require("../lib/funcs/jsonReader.js");
const version = require("../package.json");
const chalk = require("chalk");

clear();

Expand Down Expand Up @@ -164,4 +166,59 @@ program
}
});

program
.command("version")
.alias("v")
.action(function () {
// displays Gitg0 on start
console.log(
figlet.textSync("Gitg0", {
horizontalLayout: "default",
verticalLayout: "default",
}),
"\n"
);
console.log("v" + version.version + "-stable");
});

program
.command("whoami")
.alias("w")
.action(function () {
// displays Gitg0 on start
console.log(
figlet.textSync("Gitg0", {
horizontalLayout: "default",
verticalLayout: "default",
}),
"\n"
);
console.log(
"You just need to know 5 simple commands you and then you're " +
chalk.bold.cyan("gtg") +
": " +
chalk.magenta("Good to Go")
);
console.log(chalk.green("\ngtg config:\n"));
console.log(
"This command should be used to personalise your gitgo configuration. You can add your repository's commit and emoticon guidelines.\n"
);
console.log(chalk.green("\ngtg start:\n"));
console.log(
"Everytime you start working on a new issue, just run this command in order for the tool to know which issue you're working on. After this, the tool will suggest the branch names and commit messages automatically.\n"
);
console.log(chalk.green("\ngtg display:\n"));
console.log(
"This command can be used to display the branch name and commit that the tool will be suggesting for a particular issue once gtg start has been run.\n"
);
console.log(chalk.green("\ngtg checkout:\n"));
console.log(
"This is a replacement for git checkout and will simply checkout with the suggested branch name.\n"
);
console.log(chalk.green("\ngtg checkout:\n"));
console.log(
"This is a replacement for git commit and will commit your files once added with the suggested commit message.\n"
);
});

program.parse(process.argv);