the-cafe / git-ai-commit

let AI write your commit messages
https://pypi.org/project/git-ai-commit/
51 stars 0 forks source link

enable support for setting multiple config at once #24

Closed ming1in closed 3 months ago

ming1in commented 3 months ago

Description

Previously if you try to set multiple config attributes at once, it will only set the first one and ignore the rest. In the example below only the API key was updates not the logger

> git_ai_commit config --openai-key=<api-key> --logger=False

OpenAI API key set successfully

Test Plan

build and install to get the latest change

> pip install . && pre-commit install && pre-commit autoupdate

try to set multiple configs, observe multiple attributes get configured

> git_ai_commit config --openai-key=<api-key> --logger=True --model=gpt-3.5-turbo

OpenAI API key set successfully
Logger disabled
Model set to gpt-3.5-turbo