The file path in the URL constructor was incorrect, causing the file to not be found. The file path has been corrected to point to the correct location.
* 📝 docs(TODO.md): add tasks for adding tests and making hook work
The HOOK_PATH import path was incorrect and has been fixed. The TODO list has been updated to include tasks for adding tests and making the hook work.
* 🐛 fix(TODO.md): update existing TODO item
The first item is a fix for a missing TODO item. The second item is an update to an existing TODO item. The bundle size can be reduced by properly configuring esbuild. Additionally, small files can be batched together in a single request to further reduce the bundle size.
The 'publish' script has been changed to 'prepublish' to ensure that the version is updated before publishing the package. This is a best practice to ensure that the published package has the correct version number.
* ✨ feat(package.json): add publish script
The cli file extension has been changed from .mjs to .cjs to improve compatibility with Node.js. The publish script has been added to simplify the process of publishing a new version of the package to npm.
* 🎨 style(api.ts): remove unused import statement
* 🐛 fix(api.ts): remove setConfig function call
* 🚧 chore(api.ts): add comment to explain apiKey variable initialization
* 🚧 chore(api.ts): comment out code block that prompts user for OPENAI_API_KEY
The unused import statement for `text` function from `@clack/prompts` has been removed. The `setConfig` function call has been removed as it is not needed and was causing an error. A comment has been added to explain the initialization of the `apiKey` variable. The code block that prompts the user for `OPENAI_API_KEY` has been commented out as it is not needed and was causing an error.
* 🐛 fix(tsconfig.json): change target to ES6
The target was previously set to ESNext, which is not supported by all browsers. Changing it to ES6 ensures that the emitted JavaScript is compatible with a wider range of browsers.
Added an examples section to the README.md file to showcase how OpenCommit works. The section includes a link to the relevant commit and a brief description of the configurable options.
* ✨ feat(generateCommitMessageFromGitDiff.ts): add support for generating commit messages with chat completion
The length of the initial messages prompt is now added to the check for maximum request tokens to ensure that the request does not exceed the maximum allowed tokens. Support for generating commit messages with chat completion has been added, which allows for more efficient and streamlined commit message generation.
2023-03-06 18:38:33 +08:00
8 changed files with 53 additions and 24 deletions
Look into [the commits](https://github.com/di-sukharev/opencommit/commit/4795a695800686c42e7c72fca7569103d21cd510) to see how OpenCommit works. Emoji and long commit description text is configurable.
## Setup
> The minimum supported version of Node.js is the latest v14. Check your Node.js version with `node --version`.
@@ -79,7 +83,7 @@ To remove description:
opencommit config set description=false
```
## Git hook
<!-- ## Git hook
You can set opencommit as Git [`prepare-commit-msg`](https://git-scm.com/docs/githooks#_prepare_commit_msg) hook. Hook integrates with you IDE Source Control and allows you edit the message before commit.
@@ -102,7 +106,7 @@ To use the hook:
git commit
```
Or follow the process of your IDE Source Control feature, when it calls `git commit` command — OpenCommit will integrate into the flow.
Or follow the process of your IDE Source Control feature, when it calls `git commit` command — OpenCommit will integrate into the flow. -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.