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
29 changes: 18 additions & 11 deletions .gitgo
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"current_issue": {
"number": "43",
"number": "20",
"labels": [
"cli"
"cli",
"enhancement"
],
"title": "Change suggested text color to green"
"title": "Add branch name & commit message suggestions "
},
"commit_guidelines": [],
"commit_guidelines": [
"fix:",
" feat:",
" chore:"
],
"custom_guidelines": false,
"selected_commit_type": "🎨 Improving UI",
"selected_commit_type": "🐎 Improving performance",
"emojis": {
"initial_commit": "tada",
"feature": "sparkles",
Expand All @@ -27,14 +32,16 @@
"wip": "construction"
},
"existing_branches": [
"commands",
"fix-commit",
"issuetype-rec",
"main",
"readme",
"recommendation-text-color"
"notice",
"readme"
],
"current_branch": [
"branch-name",
"branch-name",
"message-suggestions"
],
"current_branch": "capitalizing-default-value",
"current_commit_message": ":pencil: cli: Capitalizing default value on pressing enter",
"current_commit_message": "🐎 chore: Add branch name & commit message suggestions ",
"use_emojis": true
}
12 changes: 6 additions & 6 deletions lib/funcs/commit-gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stopwords = ['a', 'the'];

module.exports = {
suggestCommitMsg:() => {
reader.jsonReader('./.gitgo', (err, conf) => {
setTimeout(()=>{reader.jsonReader('./.gitgo', (err, conf) => {
if (err) {
console.log(err)
return
Expand All @@ -16,7 +16,7 @@ module.exports = {
var issue_title = conf.current_issue.title;
var issue_number = conf.current_issue.number;
var commitGuidelines = conf.commit_guidelines;
var customBoolean = conf. custom_guidelines;
var customBoolean = conf.custom_guidelines;
var commitTypeContent = String(conf.selected_commit_type.match(/([A-Za-z\s\-]+)\w+/g)).trim();
var commitTypeEmoji;
var emojiBool = conf.use_emojis;
Expand Down Expand Up @@ -119,7 +119,7 @@ module.exports = {
// {
// commitTypeEmoji = conf.emojis.feature;
// }

}
commitTypeEmoji = emoji.get(':'+commitTypeEmoji+':');

Expand Down Expand Up @@ -199,11 +199,11 @@ module.exports = {
commitMsg = `${prefix} ${issue_title}`;
conf.current_commit_message = commitMsg;
}

}
fs.writeFile('./.gitgo', JSON.stringify(conf, null, 2), (err) => {
if (err) console.log('Error writing file:', err)
})
});
})
});},6000)
}
}
Loading