394 Commits

Author SHA1 Message Date
di-sukharev
9cf2db84a9 3.0.15 v3.0.15 2024-05-05 19:12:23 +03:00
GPT10
ec307d561f 3.0.14 (#333)
* test:  add the first E2E test and configuration to CI (#316)

* add tests

* Add push config (#220)

* feat: add instructions and support for configuring gpt-4-turbo (#320)

* 3.0.12

* build

* feat: add 'gpt-4-turbo' to supported models in README and config validation

---------

Co-authored-by: di-sukharev <dim.sukharev@gmail.com>

*  fix the broken E2E tests due to the addition of OCO_GITPUSH (#321)

* test(oneFile.test.ts): update test expectations to match new push prompt text

* build

* Feat: Add Claude 3 support (#318)

* 3.0.12

* build

* feat: anthropic claude 3 support

* fix: add system prompt

* fix: type check

* fix: package version

* fix: update anthropic for dependency bug fix

* feat: update build files

* feat: update version number

---------

Co-authored-by: di-sukharev <dim.sukharev@gmail.com>

* 🐛bug fix: enable to use the new format of OpenAI's project API Key (#328)

* fix(config.ts): remove validation for OCO_OPENAI_API_KEY length to accommodate variable key lengths

* build

* ♻️ refactor(config.ts): Addition of UnitTest environment and unittest for commands/config.ts#getConfig (#330)

* feat(jest.config.ts): update jest preset for TS ESM support and ignore patterns
feat(package.json): add test:unit script with NODE_OPTIONS for ESM
refactor(src/commands/config.ts): improve dotenv usage with dynamic paths
feat(src/commands/config.ts): allow custom config and env paths in getConfig
refactor(src/commands/config.ts): streamline environment variable access

feat(test/unit): add unit tests for config handling and utility functions

- Implement unit tests for `getConfig` function to ensure correct behavior
  in various scenarios including default values, global config, and local
  env file precedence.
- Add utility function `prepareFile` for creating temporary files during
  tests, facilitating testing of file-based configurations.

* feat(e2e.yml): add unit-test job to GitHub Actions for running unit tests on pull requests

* ci(test.yml): add GitHub Actions workflow for unit and e2e tests on pull requests

* refactor(config.ts): streamline environment variable access using process.env directly
test(config.test.ts): add setup and teardown for environment variables in tests to ensure test isolation

* feat(package.json): add `test:all` script to run all tests in Docker
refactor(package.json): consolidate Docker build steps into `test:docker-build` script for DRY principle
fix(package.json): ensure `test:unit:docker` and `test:e2e:docker` scripts use the same Docker image and remove container after run
chore(test/Dockerfile): remove default CMD to allow dynamic test script execution in Docker

* refactor(config.test.ts): anonymize API keys in tests for better security practices

* feat(config.test.ts): add tests for OCO_ANTHROPIC_API_KEY configuration

* refactor(config.ts): streamline path imports and remove unused DotenvParseOutput

- Simplify path module imports by removing default import and using named imports for `pathJoin` and `pathResolve`.
- Remove unused `DotenvParseOutput` import to clean up the code.

* refactor(config.test.ts): simplify API key mock values for clarity in tests

* test(config.test.ts): remove tests for default config values and redundant cases

- Removed tests that checked for default config values when no config or env files are present, as these scenarios are now handled differently.
- Eliminated tests for empty global config and local env files to streamline testing focus on actual config loading logic.
- Removed test for prioritizing local env over global config due to changes in config loading strategy, simplifying the configuration management.

* new version

---------

Co-authored-by: Takanori Matsumoto <matscube@gmail.com>
Co-authored-by: Moret84 <aurelienrivet@hotmail.fr>
Co-authored-by: yowatari <4982161+YOwatari@users.noreply.github.com>
Co-authored-by: metavind <94786679+metavind@users.noreply.github.com>
2024-05-05 19:07:55 +03:00
di-sukharev
0ac7211ff7 build 2024-03-18 15:22:14 +08:00
di-sukharev
670a758bee 3.0.12 v3.0.12 2024-03-18 15:22:13 +08:00
di-sukharev
bdc98c6fa8 docs(README.md): update description text for better readability
style(git.ts): add line breaks for better code readability
2024-03-18 15:21:38 +08:00
di-sukharev
f0251d14bb build 2024-03-18 15:19:59 +08:00
di-sukharev
61f1a27377 Merge remote-tracking branch 'origin/master' into dev 2024-03-18 15:19:45 +08:00
Takanori Matsumoto
c39181e5bd fix(cli.ts): fix the commit function call by passing the correct arguments to the commit function (#313) 2024-03-18 12:29:35 +08:00
Mouadh HSOUMI
45dc2c4535 feat: add OCO_ONE_LINE_COMMIT config for enabling one line commit message (#307) 2024-03-09 12:44:12 +08:00
digitalstudium
a192441f68 Switch ollama api endpoint from /api/generate to /api/chat (#304)
* 3.0.11

* build

* docs: update ollama usage readme (#301)

Signed-off-by: Albert Simon <albert.simon.sge@mango.com>
Co-authored-by: Albert Simon <albert.simon.sge@mango.com>

* 🚨 BREAKING CHANGES 🚨

- feat(engine/ollama): add support for local models and change prompt format to improve AI performance
+ fix(engine/ollama): fix issue with local model not responding correctly to requests

The commit message is now more concise, clear, and informative. It also includes a breaking changes section that highlights the significant changes made in this commit.

---------

Signed-off-by: Albert Simon <albert.simon.sge@mango.com>
Co-authored-by: di-sukharev <dim.sukharev@gmail.com>
Co-authored-by: Albert Simon <47634918+willyw0nka@users.noreply.github.com>
Co-authored-by: Albert Simon <albert.simon.sge@mango.com>
Co-authored-by: Константин Шуткин <shutkin-kn@mosmetro.ru>
2024-03-08 10:08:52 +08:00
Kuma Taro
744bb9b11d Feat: Update OCO_MODEL to Latest Version and Remove Legacy GPT-3.5 Turbo Models (#299)
* fix(config.ts): improve code formatting for better readability
feat(config.ts): add additional supported models for OCO_MODEL configuration
feat(config.ts): update default OCO_MODEL value to 'gpt-3.5-turbo' for better compatibility

* docs(README.md): update OCO_MODEL options to include new GPT-4 models and remove
mention of 'gpt-3.5-turbo-16k' model
docs(README.md): update default OCO_MODEL to 'gpt-3.5-turbo' and provide
instructions for switching to GPT-4 models, specifically 'gpt-4-0125-preview'
and 'gpt-4-turbo-preview'
docs(README.md): update OCO_MODEL configuration in CI/CD pipeline to 'gpt-3.5-turbo'
docs(README.md): update cost information related to default and GPT-4 models in
OpenCommit
2024-03-06 22:00:35 +08:00
Albert Simon
f3adc86693 docs: update ollama usage readme (#301)
Signed-off-by: Albert Simon <albert.simon.sge@mango.com>
Co-authored-by: Albert Simon <albert.simon.sge@mango.com>
2024-03-06 21:56:53 +08:00
di-sukharev
714fac0637 build 2024-03-03 20:02:23 +08:00
di-sukharev
eaf6600299 3.0.11 v3.0.11 2024-03-03 20:02:21 +08:00
di-sukharev
401be04b4d fix(githook.ts): update error message to include command example for better user guidance 2024-03-03 19:58:23 +08:00
di-sukharev
a9a2131ebf build 2024-03-03 19:57:37 +08:00
Maxence d'Espeuilles
7dd8094760 🔧 refactor(commit.ts): remove messageTemplate from extraArgs to avoid duplication in commit message (#279) 2024-03-03 19:56:53 +08:00
di-sukharev
a3d3363a01 build 2024-03-03 19:44:31 +08:00
di-sukharev
75d0f57f09 3.0.10 v3.0.10 2024-03-03 19:44:30 +08:00
di-sukharev
8c92b92868 Merge branch 'dev' 2024-03-03 19:44:07 +08:00
di-sukharev
a33027b4db 🔀 refactor(commit.ts): rearrange function parameters for better readability
🎨 style(commit.ts): improve code formatting for generateCommitMessageByDiff function call
2024-03-03 19:43:40 +08:00
di-sukharev
c1797de3da build 2024-03-03 19:43:15 +08:00
di-sukharev
3d49081f6d build 2024-03-03 19:39:00 +08:00
di-sukharev
8c318d96f4 Merge branch 'dev' of github.com:di-sukharev/opencommit into dev 2024-03-03 19:37:21 +08:00
Malthe Poulsen
9b7337f67f Support Gitmoji Format in Commit Messages (#249)
* 📝 docs(prompts.ts): update prompt message to include information about GitMoji convention and descriptions of changes

📝 docs(prompts.ts): update prompt message to include information about GitMoji convention and descriptions of changes

* 🎨 (prompts.ts): import `removeConventionalCommitWord` function to remove conventional commit word from commit prompts
🐛 (prompts.ts): remove conventional commit word from `commitFix` and `commitFeat` prompts to improve clarity
📝 (removeConventionalCommitWord.ts): add `removeConventionalCommitWord` function to remove conventional commit word from commit message

* 📝 (package.json): update version from 3.0.3 to 3.0.0 to align with the latest release

* 🔧 (cli.ts): add a new flag 'fgm' to the 'flags' object to support the '--fgm' flag in the CLI command
🔧 (commit.ts): pass the value of the 'fgm' flag to the 'commit' function to enable or disable full GitMoji specification
♻️ (commit.ts): refactor the 'commit' function to accept the 'fullGitMojiSpec' parameter and pass it to the 'commit' function recursively
♻️ (generateCommitMessageFromGitDiff.ts): refactor the 'generateCommitMessageByDiff' function to accept the 'fullGitMojiSpec' parameter and pass it to the 'generateCommitMessageChatCompletionPrompt' function
♻️ (generateCommitMessageFromGitDiff.ts): refactor the 'generateCommitMessageChatCompletionPrompt' function to accept the 'fullGitMojiSpec' parameter and pass it to the 'getMainCommitPrompt' function
♻️ (generateCommitMessageFromGitDiff.ts): refactor the 'getCommitMsgsPromisesFromFileDiffs' function to accept the 'fullGitMojiSpec' parameter and pass it to the 'getMessagesPromisesByChangesInFile' function
♻️ (generateCommitMessageFromGitDiff.ts): refactor the 'getMessagesPromisesByChangesInFile' function to accept the 'fullGitMojiSpec' parameter and pass it to the 'generateCommitMessageChatCompletionPrompt' function
♻️ (prompts.ts): refactor the 'getMainCommitPrompt' function to accept the 'fullGitMojiSpec' parameter and pass it to the 'INIT_MAIN_PROMPT' function

* 📝 (README.md): add documentation for the `--fgm` flag in the `oco` command to enable the use of the full GitMoji specification

* 📝 (README.md): update flag description for using full GitMoji specification
📝 (README.md): add link to the GitMoji specification for reference

* 🔧 (README.md): fix a typo in the description of the `Use Full GitMoji Specification` flag
🔧 (api.ts): update the default value of the `apiKey` variable to a placeholder value for testing purposes

* Revert "🔧 (README.md): fix a typo in the description of the `Use Full GitMoji Specification` flag"

This reverts commit 230a4aa449.

* 🔧 (README.md): fix a typo in the description of the `Use Full GitMoji Specification` flag

* 📝 (prompts.ts): update INIT_MAIN_PROMPT content to include information about the fullGitMojiSpec flag and provide instructions on how to choose the right emoji for the commit message

---------

Co-authored-by: GPT10 <57486732+di-sukharev@users.noreply.github.com>
2024-03-03 19:36:55 +08:00
di-sukharev
0b5adf104a build 2024-03-03 19:36:23 +08:00
Jack Lukic
ec699c48bf Bug (commitling) Parse JSON blocks from return response (#297) 2024-03-03 19:23:44 +08:00
mattsalt123
c9b45492a5 feat: Add Input Token Limit Config Option (#281) 2024-02-29 23:06:23 +08:00
di-sukharev
b0b90679a4 build 2024-02-28 19:29:20 +08:00
di-sukharev
02cef105a6 3.0.9 v3.0.9 2024-02-28 19:29:17 +08:00
di-sukharev
407ca4b244 build 2024-02-28 19:19:42 +08:00
di-sukharev
62e44e5e35 3.0.8 v3.0.8 2024-02-28 19:19:41 +08:00
di-sukharev
03fce6f5cf build 2024-02-28 19:19:11 +08:00
di-sukharev
6155fca4b1 3.0.7 v3.0.7 2024-02-28 19:19:09 +08:00
di-sukharev
22d4af48c7 build 2024-02-28 19:19:04 +08:00
di-sukharev
17d5a7143f Merge branch 'dev' 2024-02-28 19:18:11 +08:00
Isaac Johnston
011db5ad5e feat: add instructions and support for configuring GPT-4 Turbo (Preview) (#274)
* docs(README.md): add instructions for configuring GPT-4 Turbo (Preview)
feat(config.ts): include 'gpt-4-1106-preview' in the list of supported models

* fix(config.ts): update error message to include 'gpt-4-1106-preview' as a supported model
2024-02-28 19:17:10 +08:00
di-sukharev
89682f0397 remove stale issue action 2024-02-28 14:01:07 +08:00
di-sukharev
9ed9174b6f build 2024-02-27 22:17:08 +08:00
di-sukharev
53ae8926fa 3.0.6 v3.0.6 2024-02-27 22:17:06 +08:00
di-sukharev
6c743ba230 chore(README.md): update link to GitHub 2023 hackathon in README
The link to the GitHub 2023 hackathon in the README has been updated to point to the correct URL. This ensures that users can easily access the relevant information about the hackathon.
2024-02-27 22:16:23 +08:00
di-sukharev
9852c36a98 build 2024-02-27 22:07:18 +08:00
di-sukharev
5f85cafc7e 3.0.5 v3.0.5 2024-02-27 22:07:16 +08:00
di-sukharev
0591e6e81e docs(README.md): add alternative ways to run OpenCommit via npx and bunx
The README.md file has been updated to include alternative ways to run OpenCommit via the `npx opencommit` and `bunx opencommit` commands. This provides users with more options to execute the tool without the need for a global installation.
2024-02-27 22:06:08 +08:00
di-sukharev
a296892aaf build 2024-02-27 22:04:39 +08:00
di-sukharev
45958284c9 Merge branch 'master' into dev 2024-02-27 22:04:13 +08:00
Jaroslaw Weber
1d6980faf3 add ollama support (#269)
* add ollama support

---------

Co-authored-by: di-sukharev <dim.sukharev@gmail.com>
Co-authored-by: GPT10 <57486732+di-sukharev@users.noreply.github.com>
Co-authored-by: Jaroslaw Weber <jaroslaw.weber@adriel.com>
2024-02-27 22:01:13 +08:00
di-sukharev
f793f01059 Merge branch 'master' of github.com:di-sukharev/opencommit 2023-11-27 12:14:13 +08:00
di-sukharev
7deffa8ee2 update twitter 2023-11-27 12:00:28 +08:00
GPT10
84dfc85328 Update README.md
fix(README.md): GitHub hackathon link
2023-10-05 22:05:45 +08:00