mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-01-13 07:38:01 -05:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6126fad25c | ||
|
|
01cdd2f58d | ||
|
|
acdf464d2e | ||
|
|
3705a66ada | ||
|
|
bdb8da49b7 | ||
|
|
6e896ec428 | ||
|
|
9ce961ccc0 | ||
|
|
1a2f6416cc | ||
|
|
4fa438ab17 | ||
|
|
4ad7a5f779 | ||
|
|
5c0b31600f | ||
|
|
d785b821ea |
@@ -83,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.
|
||||
|
||||
@@ -106,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. -->
|
||||
|
||||
## Payments
|
||||
|
||||
|
||||
3
TODO.md
3
TODO.md
@@ -2,4 +2,7 @@
|
||||
|
||||
- [] [build for both mjs and cjs](https://snyk.io/blog/best-practices-create-modern-npm-package/)
|
||||
- [] make bundle smaller by properly configuring esbuild
|
||||
- [] do // TODOs in the code
|
||||
- [] batch small files in one request
|
||||
- [] add tests
|
||||
- [] make hook work
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "open-commit",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.16",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "open-commit",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.16",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@clack/prompts": "^0.6.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "opencommit",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.16",
|
||||
"description": "AI generates conventional commits with mind-blowing accuracy.",
|
||||
"keywords": [
|
||||
"git",
|
||||
|
||||
0
src/cli.ts
Normal file → Executable file
0
src/cli.ts
Normal file → Executable file
@@ -29,8 +29,15 @@ export const hookCommand = command(
|
||||
|
||||
if (mode === 'set') {
|
||||
intro(`setting opencommit as '${HOOK_NAME}' hook`);
|
||||
|
||||
if (isHookExists) {
|
||||
const realPath = await fs.realpath(SYMLINK_URL);
|
||||
let realPath;
|
||||
try {
|
||||
realPath = await fs.realpath(SYMLINK_URL);
|
||||
} catch (error) {
|
||||
outro(error as string);
|
||||
realPath = null;
|
||||
}
|
||||
|
||||
if (realPath === HOOK_PATH)
|
||||
return outro(`opencommit is already set as '${HOOK_NAME}'`);
|
||||
@@ -49,6 +56,7 @@ export const hookCommand = command(
|
||||
|
||||
if (mode === 'unset') {
|
||||
intro(`unsetting opencommit as '${HOOK_NAME}' hook`);
|
||||
|
||||
if (!isHookExists) {
|
||||
return outro(
|
||||
`opencommit wasn't previously set as '${HOOK_NAME}' hook, nothing to remove`
|
||||
|
||||
Reference in New Issue
Block a user