git-aicommit 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/autocommit.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,4 +40,17 @@ export GIT_AI_AUTOCOMMIT=1
|
|
|
40
40
|
git-aicommit
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Or make an alias and export envs:
|
|
43
|
+
Or even better: make an alias and export envs:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
alias gai='git-aicommit'
|
|
47
|
+
export OPENAI_API_KEY=YOUR_OPEN_API_KEY
|
|
48
|
+
export GIT_AI_AUTOCOMMIT=1
|
|
49
|
+
|
|
50
|
+
# And run it:
|
|
51
|
+
gai
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
It that simple!
|
|
55
|
+
|
|
56
|
+
|
package/autocommit.js
CHANGED
|
@@ -61,7 +61,7 @@ openai
|
|
|
61
61
|
})
|
|
62
62
|
.then((data) => {
|
|
63
63
|
const commitMessage = data.data.choices[0].text;
|
|
64
|
-
const command = `git add --all && git commit -m "${commitMessage.replace(/"/g, '\\"')
|
|
64
|
+
const command = `git add --all && git commit -m "${commitMessage.replace(/"/g, '\\"')}"`;
|
|
65
65
|
|
|
66
66
|
if (!process.env.GIT_AI_AUTOCOMMIT) {
|
|
67
67
|
console.log(`Please set GIT_AI_AUTOCOMMIT to commit with following command:\n ${command}`);
|