Skip to content

Commit

Permalink
fix(changelog): don't parse commits of ignored types
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed Oct 5, 2021
1 parent 9e41cff commit 63b7e57
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"

Expand All @@ -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
Expand Down

0 comments on commit 63b7e57

Please sign in to comment.