Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ add OCO_EMOJI_POSITION_BEFORE_DESCRIPTION #288

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
docs(README.md): add instructions for configuring GitMoji position in…
… commit messages

This update provides users with the ability to customize the placement of GitMoji in their commit messages. It includes examples and command line instructions for setting the GitMoji position either before the description or at the start of the commit message.
  • Loading branch information
ThomasSanson committed Feb 29, 2024
commit 07165ca7f0a741c0ff376a7bca6d0b2530d8cd7c
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -81,6 +81,7 @@ OCO_OPENAI_MAX_TOKENS=<max response tokens from OpenAI API>
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI api>
OCO_DESCRIPTION=<postface a message with ~3 sentences description of the changes>
OCO_EMOJI=<boolean, add GitMoji>
OCO_EMOJI_POSITION_BEFORE_DESCRIPTION=<boolean, add GitMoji before description>
OCO_MODEL=<either 'gpt-4', 'gpt-3.5-turbo-16k' (default), 'gpt-3.5-turbo-0613' or 'gpt-3.5-turbo'>
OCO_LANGUAGE=<locale, scroll to the bottom to see options>
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=<message template placeholder, default: '$msg'>
@@ -109,6 +110,23 @@ To remove preface emojis:
oco config set OCO_EMOJI=false
```

The GitMoji should be placed immediately before the description in the commit message.
For example: "chore(ansible-lint.yml): 🔧 remove yaml[line-length] from skip_list".


```sh
oco config set OCO_EMOJI_POSITION_BEFORE_DESCRIPTION=true
```


The GitMoji should be placed at the start of the commit message.
For example: "🔧 chore(ansible-lint.yml): remove yaml[line-length] from skip_list".


```sh
oco config set OCO_EMOJI_POSITION_BEFORE_DESCRIPTION=false
```

### Switch to GPT-4 or other models

By default, OpenCommit uses `gpt-3.5-turbo-16k` model.
@@ -333,6 +351,7 @@ jobs:
OCO_OPENAI_BASE_PATH: ''
OCO_DESCRIPTION: false
OCO_EMOJI: false
OCO_EMOJI_POSITION_BEFORE_DESCRIPTION: false
OCO_MODEL: gpt-3.5-turbo-16k
OCO_LANGUAGE: en
OCO_PROMPT_MODULE: conventional-commit