From 2452d6145a1fd6463168eb07f1595aa4ce48b415 Mon Sep 17 00:00:00 2001 From: demenik Date: Tue, 2 Dec 2025 17:58:31 +0100 Subject: [PATCH] feat: Add other conventional commit types --- home/shells/zsh/scripts/git-changes.sh | 49 ++++++++++++++++++++------ 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/home/shells/zsh/scripts/git-changes.sh b/home/shells/zsh/scripts/git-changes.sh index 0e120f5..33b6857 100644 --- a/home/shells/zsh/scripts/git-changes.sh +++ b/home/shells/zsh/scripts/git-changes.sh @@ -41,12 +41,17 @@ get_commit_link() { echo "($hash)" fi } - feats="" fixes="" -docs="" refactors="" +perfs="" +styles="" tests="" +builds="" +ops="" +docs="" +chores="" +merges="" others="" echo "Generating changelog for '$TARGET_BRANCH' (comparing against '$BASE_BRANCH')..." @@ -64,9 +69,15 @@ while IFS="|" read -r hash subject; do case "$type" in feat) feats="${feats}\n${line}" ;; fix) fixes="${fixes}\n${line}" ;; - docs) docs="${docs}\n${line}" ;; - refactor) refactors="${refactors}\n${line}" ;; - test) tests="${tests}\n${line}" ;; + refactor) refactors="${refactors}\n- ${line}" ;; + perf) perfs="${perfs}\n- ${line}" ;; + style) styles="${styles}\n- ${line}" ;; + test) tests="${tests}\n- ${line}" ;; + build) builds="${builds}\n- ${line}" ;; + ops) ops="${ops}\n- ${line}" ;; + docs) docs="${docs}\n- ${line}" ;; + chore) chores="${chores}\n- ${line}" ;; + merge) merges="${merges}\n- ${line}" ;; *) others="${others}\n${line} (Type: $type)" ;; esac else @@ -82,16 +93,34 @@ fi if [ -n "$fixes" ]; then echo -e "\n- **Bug Fixes:**$fixes" fi -if [ -n "$docs" ]; then - echo -e "\n- **Documentation:**$docs" -fi if [ -n "$refactors" ]; then - echo -e "\n- **Refactoring:**$refactors" + echo -e "\n- **Code Refactoring:**$refactors" +fi +if [ -n "$perfs" ]; then + echo -e "\n- **Performance Improvements:**$perfs" +fi +if [ -n "$styles" ]; then + echo -e "\n- **Code Style:**$styles" fi if [ -n "$tests" ]; then echo -e "\n- **Tests:**$tests" fi +if [ -n "$builds" ]; then + echo -e "\n- **Build System/Dependencies:**$builds" +fi +if [ -n "$ops" ]; then + echo -e "\n- **Operations/Infrastructure:**$ops" +fi +if [ -n "$docs" ]; then + echo -e "\n- **Documentation:**$docs" +fi +if [ -n "$chores" ]; then + echo -e "\n- **Chores/Maintenance:**$chores" +fi +if [ -n "$merges" ]; then + echo -e "\n- **Merges:**$merges" +fi if [ -n "$others" ]; then - echo -e "\n- **Other Changes:**$others" + echo -e "\n- **Other Commits:**$others" fi echo -e "\n> Automatically generated by [git-changes](https://github.com/demenik/dots/tree/main/home/shells/zsh/scripts/git-changes.sh)"