You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 📝 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 230a4aa.
* 🔧 (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>
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,8 @@ git add <files...>
58
58
oco
59
59
```
60
60
61
+
Link to the GitMoji specification: https://gitmoji.dev/
62
+
61
63
You can also run it with local model through ollama:
62
64
63
65
- install and start ollama
@@ -69,6 +71,17 @@ git add <files...>
69
71
AI_PROVIDER='ollama' opencommit
70
72
```
71
73
74
+
### Flags
75
+
There are multiple optional flags that can be used with the `oco` command:
76
+
77
+
#### Use Full GitMoji Specification
78
+
This flag can only be used if the `OCO_EMOJI` configuration item is set to `true`. This flag allows users to use all emojis in the GitMoji specification, By default, the GitMoji full specification is set to `false`, which only includes 10 emojis (🐛✨📝🚀✅♻️⬆️🔧🌐💡).
79
+
This is due to limit the number of tokens sent in each request. However, if you would like to use the full GitMoji specification, you can use the `--fgm` flag.
content: `${IDENTITY} Your mission is to create clean and comprehensive commit messages as per the conventional commit convention and explain WHAT were the changes and mainly WHY the changes were done. I'll send you an output of 'git diff --staged' command, and you are to convert it into a commit message.
24
-
${
25
-
config?.OCO_EMOJI
26
-
? 'Use GitMoji convention to preface the commit.'
27
-
: 'Do not preface the commit with anything.'
28
-
}
27
+
content: `${IDENTITY} Your mission is to create clean and comprehensive commit messages as per the ${
} and explain WHAT were the changes and mainly WHY the changes were done. I'll send you an output of 'git diff --staged' command, and you are to convert it into a commit message.
30
+
${
31
+
config?.OCO_EMOJI
32
+
? 'Use GitMoji convention to preface the commit. Here are some help to choose the right emoji (emoji, description): '+
33
+
'🐛, Fix a bug; '+
34
+
'✨, Introduce new features; '+
35
+
'📝, Add or update documentation; '+
36
+
'🚀, Deploy stuff; '+
37
+
'✅, Add, update, or pass tests; '+
38
+
'♻️, Refactor code; '+
39
+
'⬆️, Upgrade dependencies; '+
40
+
'🔧, Add or update configuration files; '+
41
+
'🌐, Internationalization and localization; '+
42
+
'💡, Add or update comments in source code; '+
43
+
`${
44
+
fullGitMojiSpec
45
+
? '🎨, Improve structure / format of the code; '+
46
+
'⚡️, Improve performance; '+
47
+
'🔥, Remove code or files; '+
48
+
'🚑️, Critical hotfix; '+
49
+
'💄, Add or update the UI and style files; '+
50
+
'🎉, Begin a project; '+
51
+
'🔒️, Fix security issues; '+
52
+
'🔐, Add or update secrets; '+
53
+
'🔖, Release / Version tags; '+
54
+
'🚨, Fix compiler / linter warnings; '+
55
+
'🚧, Work in progress; '+
56
+
'💚, Fix CI Build; '+
57
+
'⬇️, Downgrade dependencies; '+
58
+
'📌, Pin dependencies to specific versions; '+
59
+
'👷, Add or update CI build system; '+
60
+
'📈, Add or update analytics or track code; '+
61
+
'➕, Add a dependency; '+
62
+
'➖, Remove a dependency; '+
63
+
'🔨, Add or update development scripts; '+
64
+
'✏️, Fix typos; '+
65
+
'💩, Write bad code that needs to be improved; '+
66
+
'⏪️, Revert changes; '+
67
+
'🔀, Merge branches; '+
68
+
'📦️, Add or update compiled files or packages; '+
69
+
'👽️, Update code due to external API changes; '+
70
+
'🚚, Move or rename resources (e.g.: files, paths, routes); '+
71
+
'📄, Add or update license; '+
72
+
'💥, Introduce breaking changes; '+
73
+
'🍱, Add or update assets; '+
74
+
'♿️, Improve accessibility; '+
75
+
'🍻, Write code drunkenly; '+
76
+
'💬, Add or update text and literals; '+
77
+
'🗃️, Perform database related changes; '+
78
+
'🔊, Add or update logs; '+
79
+
'🔇, Remove logs; '+
80
+
'👥, Add or update contributor(s); '+
81
+
'🚸, Improve user experience / usability; '+
82
+
'🏗️, Make architectural changes; '+
83
+
'📱, Work on responsive design; '+
84
+
'🤡, Mock things; '+
85
+
'🥚, Add or update an easter egg; '+
86
+
'🙈, Add or update a .gitignore file; '+
87
+
'📸, Add or update snapshots; '+
88
+
'⚗️, Perform experiments; '+
89
+
'🔍️, Improve SEO; '+
90
+
'🏷️, Add or update types; '+
91
+
'🌱, Add or update seed files; '+
92
+
'🚩, Add, update, or remove feature flags; '+
93
+
'🥅, Catch errors; '+
94
+
'💫, Add or update animations and transitions; '+
95
+
'🗑️, Deprecate code that needs to be cleaned up; '+
96
+
'🛂, Work on code related to authorization, roles and permissions; '+
97
+
'🩹, Simple fix for a non-critical issue; '+
98
+
'🧐, Data exploration/inspection; '+
99
+
'⚰️, Remove dead code; '+
100
+
'🧪, Add a failing test; '+
101
+
'👔, Add or update business logic; '+
102
+
'🩺, Add or update healthcheck; '+
103
+
'🧱, Infrastructure related changes; '+
104
+
'🧑💻, Improve developer experience; '+
105
+
'💸, Add sponsorships or money related infrastructure; '+
106
+
'🧵, Add or update code related to multithreading or concurrency; '+
107
+
'🦺, Add or update code related to validation.'
108
+
: ''
109
+
}`
110
+
: 'Do not preface the commit with anything. Conventional commit keywords:'+
0 commit comments