opencommit 2.0.19 → 2.1.0
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 +18 -17
- package/out/cli.cjs +4 -5
- package/out/github-action.cjs +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ on:
|
|
|
37
37
|
|
|
38
38
|
jobs:
|
|
39
39
|
opencommit:
|
|
40
|
+
timeout-minutes: 10
|
|
40
41
|
name: OpenCommit
|
|
41
42
|
runs-on: ubuntu-latest
|
|
42
43
|
permissions: write-all
|
|
@@ -75,7 +76,7 @@ Interactive rebase (`rebase -i`) changes commit SHA, so commit history in remote
|
|
|
75
76
|
|
|
76
77
|
## Setup OpenCommit as a CLI
|
|
77
78
|
|
|
78
|
-
You can use OpenCommit by simply running it via CLI like this `
|
|
79
|
+
You can use OpenCommit by simply running it via CLI like this `oco`. 2 seconds and your staged changes are committed with a meaningful message.
|
|
79
80
|
|
|
80
81
|
1. Install OpenCommit globally to use in any repository:
|
|
81
82
|
|
|
@@ -102,7 +103,7 @@ git add <files...>
|
|
|
102
103
|
opencommit
|
|
103
104
|
```
|
|
104
105
|
|
|
105
|
-
You can also use the `
|
|
106
|
+
You can also use the `oco` shortcut:
|
|
106
107
|
|
|
107
108
|
```sh
|
|
108
109
|
git add <files...>
|
|
@@ -132,19 +133,19 @@ Local config still has more priority as Global config, but you may set `OCO_MODE
|
|
|
132
133
|
Simply run any of the variable above like this:
|
|
133
134
|
|
|
134
135
|
```sh
|
|
135
|
-
|
|
136
|
+
oco config set OCO_OPENAI_API_KEY=gpt-4
|
|
136
137
|
```
|
|
137
138
|
|
|
138
139
|
Configure [GitMoji](https://gitmoji.dev/) to preface a message.
|
|
139
140
|
|
|
140
141
|
```sh
|
|
141
|
-
|
|
142
|
+
oco config set OCO_EMOJI=true
|
|
142
143
|
```
|
|
143
144
|
|
|
144
145
|
To remove preface emoji:
|
|
145
146
|
|
|
146
147
|
```sh
|
|
147
|
-
|
|
148
|
+
oco config set OCO_EMOJI=false
|
|
148
149
|
```
|
|
149
150
|
|
|
150
151
|
### Switch to GPT-4
|
|
@@ -154,7 +155,7 @@ By default OpenCommit uses GPT-3.5-turbo (ChatGPT).
|
|
|
154
155
|
You may switch to GPT-4 which performs better, but costs ~x15 times more 🤠
|
|
155
156
|
|
|
156
157
|
```sh
|
|
157
|
-
|
|
158
|
+
oco config set OCO_MODEL=gpt-4
|
|
158
159
|
```
|
|
159
160
|
|
|
160
161
|
Make sure you do lowercase `gpt-4` and you have API access to the 4th model. Even if you have ChatGPT+ it doesn't necessarily mean that you have API access to GPT-4.
|
|
@@ -165,25 +166,25 @@ To globally specify the language used to generate commit messages:
|
|
|
165
166
|
|
|
166
167
|
```sh
|
|
167
168
|
# de, German ,Deutsch
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
oco config set OCO_LANGUAGE=de
|
|
170
|
+
oco config set OCO_LANGUAGE=German
|
|
171
|
+
oco config set OCO_LANGUAGE=Deutsch
|
|
171
172
|
|
|
172
173
|
# fr, French, française
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
oco config set OCO_LANGUAGE=fr
|
|
175
|
+
oco config set OCO_LANGUAGE=French
|
|
176
|
+
oco config set OCO_LANGUAGE=française
|
|
176
177
|
```
|
|
177
178
|
|
|
178
|
-
The default language set is **English**
|
|
179
|
+
The default language set is **English**
|
|
179
180
|
All available languages are currently listed in the [i18n](https://github.com/di-sukharev/opencommit/tree/master/src/i18n) folder
|
|
180
181
|
|
|
181
182
|
### Git flags
|
|
182
183
|
|
|
183
|
-
The `opencommit` or `
|
|
184
|
+
The `opencommit` or `oco` commands can be used in place of the `git commit -m "${generatedMessage}"` command. This means that any regular flags that are used with the `git commit` command will also be applied when using `opencommit` or `oco`.
|
|
184
185
|
|
|
185
186
|
```sh
|
|
186
|
-
|
|
187
|
+
oco --no-verify
|
|
187
188
|
```
|
|
188
189
|
|
|
189
190
|
is translated to :
|
|
@@ -212,13 +213,13 @@ You can set OpenCommit as Git [`prepare-commit-msg`](https://git-scm.com/docs/gi
|
|
|
212
213
|
To set the hook:
|
|
213
214
|
|
|
214
215
|
```sh
|
|
215
|
-
|
|
216
|
+
oco hook set
|
|
216
217
|
```
|
|
217
218
|
|
|
218
219
|
To unset the hook:
|
|
219
220
|
|
|
220
221
|
```sh
|
|
221
|
-
|
|
222
|
+
oco hook unset
|
|
222
223
|
```
|
|
223
224
|
|
|
224
225
|
To use the hook:
|
package/out/cli.cjs
CHANGED
|
@@ -16272,7 +16272,7 @@ function G3(t, e2) {
|
|
|
16272
16272
|
// package.json
|
|
16273
16273
|
var package_default = {
|
|
16274
16274
|
name: "opencommit",
|
|
16275
|
-
version: "2.0.
|
|
16275
|
+
version: "2.0.19",
|
|
16276
16276
|
description: "Auto-generate impressive commits in 1 second. Killing lame commits with AI \u{1F92F}\u{1F52B}",
|
|
16277
16277
|
keywords: [
|
|
16278
16278
|
"git",
|
|
@@ -16289,7 +16289,6 @@ var package_default = {
|
|
|
16289
16289
|
main: "cli.js",
|
|
16290
16290
|
bin: {
|
|
16291
16291
|
opencommit: "./out/cli.cjs",
|
|
16292
|
-
oc: "./out/cli.cjs",
|
|
16293
16292
|
oco: "./out/cli.cjs"
|
|
16294
16293
|
},
|
|
16295
16294
|
repository: {
|
|
@@ -21686,7 +21685,7 @@ var [command, mode] = process.argv.slice(2);
|
|
|
21686
21685
|
if (!apiKey && command !== "config" && mode !== "set" /* set */) {
|
|
21687
21686
|
ae("opencommit");
|
|
21688
21687
|
ce(
|
|
21689
|
-
"OCO_OPENAI_API_KEY is not set, please run `
|
|
21688
|
+
"OCO_OPENAI_API_KEY is not set, please run `oco config set OCO_OPENAI_API_KEY=<your token>. Make sure you add payment details, so API works.`"
|
|
21690
21689
|
);
|
|
21691
21690
|
ce(
|
|
21692
21691
|
"For help look into README https://github.com/di-sukharev/opencommit#setup"
|
|
@@ -21903,7 +21902,7 @@ var prepareCommitMessageHook = async (isStageAllFlag = false) => {
|
|
|
21903
21902
|
if (changedFiles)
|
|
21904
21903
|
await gitAdd({ files: changedFiles });
|
|
21905
21904
|
else {
|
|
21906
|
-
ce("No changes detected, write some code and run `
|
|
21905
|
+
ce("No changes detected, write some code and run `oco` again");
|
|
21907
21906
|
process.exit(1);
|
|
21908
21907
|
}
|
|
21909
21908
|
}
|
|
@@ -22037,7 +22036,7 @@ async function commit(extraArgs2 = [], isStageAllFlag = false) {
|
|
|
22037
22036
|
if (changedFiles2)
|
|
22038
22037
|
await gitAdd({ files: changedFiles2 });
|
|
22039
22038
|
else {
|
|
22040
|
-
ce("No changes detected, write some code and run `
|
|
22039
|
+
ce("No changes detected, write some code and run `oco` again");
|
|
22041
22040
|
process.exit(1);
|
|
22042
22041
|
}
|
|
22043
22042
|
}
|
package/out/github-action.cjs
CHANGED
|
@@ -26973,7 +26973,7 @@ var [command, mode] = process.argv.slice(2);
|
|
|
26973
26973
|
if (!apiKey && command !== "config" && mode !== "set" /* set */) {
|
|
26974
26974
|
ae("opencommit");
|
|
26975
26975
|
ce(
|
|
26976
|
-
"OCO_OPENAI_API_KEY is not set, please run `
|
|
26976
|
+
"OCO_OPENAI_API_KEY is not set, please run `oco config set OCO_OPENAI_API_KEY=<your token>. Make sure you add payment details, so API works.`"
|
|
26977
26977
|
);
|
|
26978
26978
|
ce(
|
|
26979
26979
|
"For help look into README https://github.com/di-sukharev/opencommit#setup"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencommit",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"git",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"main": "cli.js",
|
|
18
18
|
"bin": {
|
|
19
19
|
"opencommit": "./out/cli.cjs",
|
|
20
|
-
"oc": "./out/cli.cjs",
|
|
21
20
|
"oco": "./out/cli.cjs"
|
|
22
21
|
},
|
|
23
22
|
"repository": {
|