Skip to content

Commit d63b825

Browse files
izzybpstumfdrewpaymentmatscubeKellanStevens
authored
fix(config.ts): invalid default config (#371)
* 📝 (README.md): add support for custom AI models and update documentation to reflect new environment variable OCO_ AI_PROVIDER (#351) * Feat/add gemini (#349) * 🐛Fix: prompt-module/@commitlint (#336) * fix(commitlint/utils.ts): correct variable used in search for JSON block end tag * ♻️ (commitlint/config.ts & pwd-commitlint.ts): Refactor commitlint config loading to support both CJS and ESM modules 💡 (pwd-commitlint.ts): Add detailed comments and error handling for better clarity and robustness in commitlint module loading process * ✨ (package.json): Add setup script for e2e tests to install dependencies for commitlint configurations 🔧 (setup.sh): Add shell script to set up commitlint configurations for e2e tests * ✨ (config.ts): Add support for OCO_TEST_MOCK_TYPE configuration key to define test mock type for testing purposes 📝 (config.ts): Update documentation for OCO_TEST_MOCK_TYPE configuration key in configValidators and getConfig functions 📝 (testAi.ts): Add TEST_MOCK_TYPES constant array to define supported test mock types 📝 (testAi.ts): Update generateCommitMessage function to use OCO_TEST_MOCK_TYPE from config for different test mock types 📝 (commitlint.test.ts): Add e2e test for running "oco commitlint force" with different @commitlint versions using CJS and ESM 📝 (utils.ts): Add wait function to introduce delay in milliseconds for testing purposes * ✨ (commitlint.test.ts): refactor setupCommitlint function to accept a version parameter for better code organization and readability 📝 (commitlint.test.ts): add test case for commitlint@9 using CJS to ensure proper functionality and compatibility 📝 (commitlint.test.ts): add test case for commitlint@18 using CJS to ensure proper functionality and compatibility 📝 (commitlint.test.ts): add test case for commitlint@19 using ESM to ensure proper functionality and compatibility * 🔧 (commitlint.test.ts): remove unnecessary commands to create and add index.ts file before running tests * refactor(test/e2e/prompt-module/commitlint.test.ts): remove unused import configure style(test/e2e/prompt-module/commitlint.test.ts): add missing semicolon for consistency test(test/e2e/prompt-module/commitlint.test.ts): add e2e tests for @commitlint prompt-module integration * ✨ (e2e tests): add package.json copying to setupCommitlint for version accuracy ♻️ (commitlint config): refactor commitlint.config.js to use ES module syntax ✨ (package.json): specify "type": "module" to support ES module syntax * docs: spelling fix (#325) * 3.0.17 * ♻️ (config.ts): refactor OCO_AZURE_ENDPOINT default value from empty string to undefined resolving #352 - creates invalid config file --------- Co-authored-by: tumf <[email protected]> Co-authored-by: Drew Payment <[email protected]> Co-authored-by: Takanori Matsumoto <[email protected]> Co-authored-by: Kellan Stevens <[email protected]> Co-authored-by: di-sukharev <[email protected]>
1 parent a80dcb0 commit d63b825

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

out/cli.cjs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30691,14 +30691,7 @@ var MODEL_LIST = {
3069130691
"claude-3-5-sonnet-20240620",
3069230692
"claude-3-opus-20240229",
3069330693
"claude-3-sonnet-20240229",
30694-
"claude-3-haiku-20240307"
30695-
],
30696-
gemini: [
30697-
"gemini-1.5-flash",
30698-
"gemini-1.5-pro",
30699-
"gemini-1.0-pro",
30700-
"gemini-pro-vision",
30701-
"text-embedding-004"
30694+
"claude-3-opus-20240229"
3070230695
]
3070330696
};
3070430697
var getDefaultModel = (provider4) => {

out/github-action.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49501,7 +49501,7 @@ var MODEL_LIST = {
4950149501
"claude-3-5-sonnet-20240620",
4950249502
"claude-3-opus-20240229",
4950349503
"claude-3-sonnet-20240229",
49504-
"claude-3-haiku-20240307"
49504+
"claude-3-opus-20240229"
4950549505
],
4950649506
gemini: [
4950749507
"gemini-1.5-flash",

src/commands/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ export const getConfig = ({
395395
OCO_GITPUSH: process.env.OCO_GITPUSH === 'false' ? false : true,
396396
OCO_ONE_LINE_COMMIT:
397397
process.env.OCO_ONE_LINE_COMMIT === 'true' ? true : false,
398-
OCO_AZURE_ENDPOINT: process.env.OCO_AZURE_ENDPOINT || '',
398+
OCO_AZURE_ENDPOINT: process.env.OCO_AZURE_ENDPOINT || undefined,
399399
OCO_TEST_MOCK_TYPE: process.env.OCO_TEST_MOCK_TYPE || 'commit-message'
400400
};
401401

0 commit comments

Comments
 (0)