diff options
| author | Marc Cornellà <hello@mcornella.com> | 2021-10-05 16:56:00 +0200 | 
|---|---|---|
| committer | Marc Cornellà <hello@mcornella.com> | 2021-10-05 16:56:00 +0200 | 
| commit | 63b7e5767d551b1d839888a7216f2bed01e8eb1f (patch) | |
| tree | c294a681fbcdac734638c1e1298949a3c7f5b7b2 /tools | |
| parent | 9e41cffbf8515ba64ab2cf21b49dc78949707553 (diff) | |
| download | zsh-63b7e5767d551b1d839888a7216f2bed01e8eb1f.tar.gz zsh-63b7e5767d551b1d839888a7216f2bed01e8eb1f.tar.bz2 zsh-63b7e5767d551b1d839888a7216f2bed01e8eb1f.zip | |
fix(changelog): don't parse commits of ignored types
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/changelog.sh | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/tools/changelog.sh b/tools/changelog.sh index 7329a9526..71caa2b6c 100755 --- a/tools/changelog.sh +++ b/tools/changelog.sh @@ -120,7 +120,7 @@ function parse-commit {    fi    # Parse commit with hash $1 -  local hash="$1" subject body warning rhash +  local hash="$1" subject body type warning rhash    subject="$(command git show -s --format=%s $hash)"    body="$(command git show -s --format=%b $hash)" @@ -132,8 +132,12 @@ function parse-commit {    #  commit body    #  [BREAKING CHANGE: warning] +  # if commit type is not going to be displayed, do nothing else +  type="$(commit:type "$subject")" +  (( ${MAIN_TYPES[(Ie)$type]} || ${OTHER_TYPES[(Ie)$type]} )) || return +    # commits holds the commit type -  commits[$hash]="$(commit:type "$subject")" +  commits[$hash]="$type"    # scopes holds the commit scope    scopes[$hash]="$(commit:scope "$subject")"    # subjects holds the commit subject | 
