Skip to content

Commit d57063e

Browse files
yashk2000agg-shambhavi
authored andcommitted
🐛 cli: Update gitgo attritube dynamically
1 parent 43c98b6 commit d57063e

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

.gitgo

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
{
22
"current_issue": {
3-
"number": "8",
4-
"labels": [
5-
"enhancement",
6-
"test label"
7-
],
8-
"title": "Add a feature to suggest commit messages"
3+
"number": "",
4+
"labels": [],
5+
"title": ""
96
},
107
"commit_guidelines": [
118
"fix:",
12-
"feat:",
13-
"docs:"
9+
" feat:",
10+
" chore:"
1411
],
1512
"custom_guidelines": false,
16-
"selected_commit_type": "🎉 Initial commit",
13+
"selected_commit_type": "",
1714
"emojis": {
1815
"initial_commit": "tada",
1916
"feature": "sparkles",
@@ -33,6 +30,6 @@
3330
},
3431
"existing_branches": [],
3532
"current_branch": "",
36-
"current_emoji": "",
37-
"current_commit_message": ""
33+
"current_commit_message": "",
34+
"use_emojis": false
3835
}

lib/inquirer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ module.exports = {
9191
return
9292
}
9393
conf.commit_guidelines = ans1['commit'].split(',');
94+
conf.custom_guidelines = true;
9495
fs.writeFile('./.gitgo', JSON.stringify(conf, null, 2), (err) => {
9596
if (err) console.log('Error writing file:', err)
9697
})
@@ -130,6 +131,7 @@ module.exports = {
130131
return
131132
}
132133
conf.commit_guidelines = ans['guidelines'].split(',');
134+
conf.custom_guidelines = false;
133135
fs.writeFile('./.gitgo', JSON.stringify(conf, null, 2), (err) => {
134136
if (err) console.log('Error writing file:', err)
135137
})

0 commit comments

Comments
 (0)