the-cafe / git-ai-commit

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

Fixed Logger flag and added auto-upstream feature #16

Closed Seif-Mamdouh closed 3 months ago

Seif-Mamdouh commented 3 months ago

Description

In this PR I added a feature and fixed a bug

Bugs

New Features:

Test Plan

--logger, -l

long version

git_ai_commit config --logger true

short version

git_ai_commit config -l true

expected output:

Logger enabled

Testing for false

long version

git_ai_commit config --logger false

short version

git_ai_commit config -l false

expected output:

Logger disabled

Handle the case where user's current branch has not upstreamed yet

git checkout -b <your-branch-name>
pip3 install . && pre-commit install && pre-commit autoupdate
git add .
git_ai_commit_message

expected_output:

No upstream branch found. Setting upstream for branch <your-branch-anme >
git push ---set-upstream origin <your-branch-anme >