Compare commits

..

4 Commits

Author SHA1 Message Date
di-sukharev
e76db8276b 1.0.13 2023-03-11 00:20:09 +08:00
di-sukharev
c2ae98170c * refactor(api.ts): move apiKey initialization to the top of the file
* feat(api.ts): add check for process arguments to avoid intro message if 'config set' command is used
2023-03-11 00:19:29 +08:00
di-sukharev
91987030f0 1.0.12 2023-03-11 00:15:34 +08:00
di-sukharev
2a55b08b51 * refactor(api.ts): remove redundant code block and process.exit(1) call 2023-03-11 00:15:17 +08:00
3 changed files with 7 additions and 4 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "open-commit",
"version": "1.0.11",
"version": "1.0.13",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "open-commit",
"version": "1.0.11",
"version": "1.0.13",
"license": "ISC",
"dependencies": {
"@clack/prompts": "^0.6.1",

View File

@@ -1,6 +1,6 @@
{
"name": "opencommit",
"version": "1.0.11",
"version": "1.0.13",
"description": "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
"keywords": [
"git",

View File

@@ -11,7 +11,9 @@ const config = getConfig();
let apiKey = config?.OPENAI_API_KEY;
if (!apiKey) {
const [command, mode] = process.argv.slice(2);
if (!apiKey && command !== 'config' && mode !== 'set') {
intro('opencommit');
outro(
@@ -20,6 +22,7 @@ if (!apiKey) {
outro(
'For help Look into README https://github.com/di-sukharev/opencommit#setup'
);
process.exit(1);
}