Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
6485b83
3.2.6
di-sukharev Mar 11, 2025
ff896fc
3.2.7
di-sukharev Mar 11, 2025
7feb3ec
build
di-sukharev Mar 11, 2025
44bd14d
feat(commitlint): add additional search path for @commitlint
cometjc Mar 17, 2025
cd5198a
Merge pull request #454 from jcppkkk/master
di-sukharev Mar 17, 2025
beb623c
fix: config default settings
kvokka Mar 28, 2025
60a7650
Merge pull request #456 from kvokka/fix-config-default-settings
di-sukharev Apr 8, 2025
fb533f8
refactor(prompts): streamline commit message generation logic
cometjc Mar 27, 2025
f5c6c31
Extends #445 to other providers which many provides deepseek
kaovilai Apr 11, 2025
9418f67
Merge pull request #457 from jcppkkk/feat/commitlint-improve-consiste…
di-sukharev Apr 12, 2025
aecc832
chore: update GitHub Actions workflows to use latest action versions …
kaovilai Apr 12, 2025
566a9b1
reuse function
kaovilai Apr 12, 2025
beecedf
chore(deps): update eslint and typescript-eslint dependencies
Heyian Apr 12, 2025
22f96b3
Merge pull request #460 from Heyian/fix/punycode
di-sukharev Apr 14, 2025
1d81229
Merge pull request #459 from kaovilai/imp1
di-sukharev Apr 14, 2025
b3700ae
Merge pull request #458 from kaovilai/thiknagain
di-sukharev Apr 14, 2025
5fb3d75
fix tests
kaovilai Apr 14, 2025
6bc1d90
`npm run test:unit` passing locally
kaovilai Apr 14, 2025
9ffcdbd
refactor(commitlint): update commitlint configuration and prompts for…
cometjc Apr 1, 2025
5381c5e
chore(package.json): add rimraf as a development dependency for impro…
cometjc Apr 15, 2025
a52589e
fix(test): Stabilize Jest ESM configuration for CI
cometjc Apr 15, 2025
0ebff3b
fix(removeContentTags): keep newlines to preserve formatting
cometjc Apr 25, 2025
da2742e
chore(package.json): add rimraf as a development dependency for impro…
cometjc Apr 15, 2025
2726e51
fix(test): Stabilize Jest ESM configuration for CI
cometjc Apr 15, 2025
83b6e0b
fix(removeContentTags): keep newlines to preserve formatting
cometjc Apr 25, 2025
b277bf3
Merge pull request #465 from jcppkkk/fix-tests
di-sukharev Apr 25, 2025
25c6a0d
Merge pull request #462 from jcppkkk/master
di-sukharev Apr 25, 2025
6c48c93
✨ add custom HTTP headers support via OCO_API_CUSTOM_HEADERS
EmilienMottet Apr 29, 2025
71a44fa
♻️ refactor OpenAI client options and unify custom headers parsing
EmilienMottet Apr 30, 2025
6aae1c7
♻️(engine): extract custom header parsing and update OpenAiEngine
EmilienMottet Apr 30, 2025
f6de2dc
Merge pull request #467 from EmilienMottet/master
di-sukharev May 3, 2025
f0381c8
feat(cli.ts): enhance fgm flag to include description and default val…
kakakakakku May 19, 2025
21e9216
Merge branch 'master' into dep-updates
di-sukharev May 29, 2025
aad62d4
fix: remove duplicate modulePathIgnorePatterns in Jest config
kaovilai May 29, 2025
3b868ce
fix: enable git push functionality in e2e tests
kaovilai May 29, 2025
bc514f8
Merge pull request #461 from kaovilai/dep-updates
di-sukharev May 29, 2025
b5fca31
feat(config): add 'describe' mode to config command for detailed para…
benleibowitz May 29, 2025
668e149
fix(prompts.ts): edited contradictory assistant output
jonsguez May 30, 2025
063aa94
Merge pull request #476 from benleibowitz/master
di-sukharev May 30, 2025
c1be513
Merge pull request #477 from jonsguez/fix/one-line-commit
di-sukharev May 30, 2025
5590415
Merge pull request #472 from kakakakakku/fgm
di-sukharev May 30, 2025
e1f6579
chore(deps): bump esbuild from 0.15.18 to 0.25.5 and @actions/github …
di-sukharev Jun 8, 2025
7683004
build
di-sukharev Jun 8, 2025
59b6edb
format
di-sukharev Jun 8, 2025
75147e9
refactor(git.ts): improve git add completion message for clarity
di-sukharev Jun 8, 2025
2540c16
3.2.8
di-sukharev Jun 8, 2025
6f541d3
build
di-sukharev Jun 8, 2025
5725c77
✨ add openrouter AI provider support with comprehensive model list
frauniki Jun 14, 2025
15ac076
Merge pull request #484 from frauniki/add-openrouter-engine
di-sukharev Jun 15, 2025
e4f7e8d
✅ add prettier formatting check to CI workflow and npm scripts
frauniki Jun 15, 2025
45aed93
♻️ refactor: clean up code formatting and improve readability
frauniki Jun 15, 2025
48cdcbc
3.2.9
di-sukharev Jun 15, 2025
1f0f44e
build
di-sukharev Jun 15, 2025
c107078
Merge pull request #485 from frauniki/add-prettier-ci
di-sukharev Jun 15, 2025
19f32ca
fix(i18n): correct typo in Korean translation for 'feat' commit type …
anpigon Jun 21, 2025
3d42dde
fix(migrations): skip unhandled AI providers during migration execution
yshngg Jun 23, 2025
43dc5e6
feat(commit.ts): enable users to edit commit message before committing
leoliu0605 Jun 26, 2025
fd22f71
Merge pull request #489 from yshngg/patch-1
di-sukharev Jun 29, 2025
66a5695
feat(prepare-commit-msg-hook): enhance commit message formatting with…
PhantasWeng Jul 1, 2025
9971b3c
Merge pull request #492 from PhantasWeng/git-hook-message
di-sukharev Jul 4, 2025
3a255a3
feat(config): add OCO_HOOK_AUTO_UNCOMMENT config key and update commi…
PhantasWeng Jul 8, 2025
881f07e
fix(prepare-commit-msg-hook): simplify commit message generation logi…
PhantasWeng Jul 8, 2025
24adc16
fix(run.ts): remove trailing comma from OCO_AI_PROVIDER_ENUM array to…
PhantasWeng Jul 8, 2025
7e60c68
refactor(git): add getGitDir helper and update functions to use cwd o…
kykungz Jul 14, 2025
48b8d9d
Merge pull request #494 from PhantasWeng/commit-hook-default
di-sukharev Jul 22, 2025
1a90485
Merge pull request #491 from leoliu0605/dev
di-sukharev Jul 22, 2025
4deb7bc
Merge pull request #488 from anpigon/fix/i18n-ko
di-sukharev Jul 22, 2025
1cc7a64
feat(commit.ts): add confirmation prompt and refactor commit message …
kykungz Jul 23, 2025
dac1271
Merge pull request #496 from kykungz/resolve-top-level-git-dir
di-sukharev Jul 23, 2025
c1756b8
Merge pull request #498 from kykungz/fix-491
di-sukharev Jul 23, 2025
9321e28
feat: add AIML API integration including model fetching and engine im…
D1m7asis Jul 28, 2025
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
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -58,7 +58,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -71,6 +71,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
uses: actions/dependency-review-action@v3
35 changes: 30 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Testing

on: [pull_request]
on:
pull_request:
push:
branches:
- master
- main

jobs:
unit-test:
Expand All @@ -9,11 +14,12 @@ jobs:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Run Unit Tests
Expand All @@ -24,11 +30,12 @@ jobs:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install git
run: |
sudo apt-get update
Expand All @@ -44,3 +51,21 @@ jobs:
run: npm run build
- name: Run E2E Tests
run: npm run test:e2e
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run Prettier
run: npm run format:check
- name: Prettier Output
if: failure()
run: |
echo "Prettier check failed. Please run 'npm run format' to fix formatting issues."
exit 1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ uncaughtExceptions.log
src/*.json
.idea
test.ts
notes.md
notes.md
.nvmrc
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,15 @@ Create a `.env` file and add OpenCommit config variables there like this:

```env
...
OCO_AI_PROVIDER=<openai (default), anthropic, azure, ollama, gemini, flowise, deepseek>
OCO_AI_PROVIDER=<openai (default), anthropic, azure, ollama, gemini, flowise, deepseek, aimlapi>
OCO_API_KEY=<your OpenAI API token> // or other LLM provider API token
OCO_API_URL=<may be used to set proxy path to OpenAI api>
OCO_API_CUSTOM_HEADERS=<JSON string of custom HTTP headers to include in API requests>
OCO_TOKENS_MAX_INPUT=<max model token limit (default: 4096)>
OCO_TOKENS_MAX_OUTPUT=<max response tokens (default: 500)>
OCO_DESCRIPTION=<postface a message with ~3 sentences description of the changes>
OCO_EMOJI=<boolean, add GitMoji>
OCO_MODEL=<either 'gpt-4o', 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview' or any Anthropic or Ollama model or any string basically, but it should be a valid model name>
OCO_MODEL=<either 'gpt-4o-mini' (default), 'gpt-4o', 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo', 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview' or any Anthropic or Ollama model or any string basically, but it should be a valid model name>
OCO_LANGUAGE=<locale, scroll to the bottom to see options>
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=<message template placeholder, default: '$msg'>
OCO_PROMPT_MODULE=<either conventional-commit or @commitlint, default: conventional-commit>
Expand All @@ -132,6 +133,18 @@ Simply set any of the variables above like this:
oco config set OCO_MODEL=gpt-4o-mini
```

To see all available configuration parameters and their accepted values:

```sh
oco config describe
```

To see details for a specific parameter:

```sh
oco config describe OCO_MODEL
```

Configure [GitMoji](https://gitmoji.dev/) to preface a message.

```sh
Expand Down
22 changes: 18 additions & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,33 @@ const config: Config = {
testTimeout: 100_000,
coverageProvider: 'v8',
moduleDirectories: ['node_modules', 'src'],
preset: 'ts-jest/presets/js-with-ts-esm',
preset: 'ts-jest/presets/default-esm',
setupFilesAfterEnv: ['<rootDir>/test/jest-setup.ts'],
testEnvironment: 'node',
testRegex: ['.*\\.test\\.ts$'],
transformIgnorePatterns: ['node_modules/(?!cli-testing-library)'],
// Tell Jest to ignore the specific duplicate package.json files
// that are causing Haste module naming collisions
modulePathIgnorePatterns: [
'<rootDir>/test/e2e/prompt-module/data/'
],
transformIgnorePatterns: [
'node_modules/(?!(cli-testing-library|@clack|cleye)/.*)'
],
transform: {
'^.+\\.(ts|tsx)$': [
'^.+\\.(ts|tsx|js|jsx|mjs)$': [
'ts-jest',
{
diagnostics: false,
useESM: true
useESM: true,
tsconfig: {
module: 'ESNext',
target: 'ES2022'
}
}
]
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
}
};

Expand Down
Loading