Skip to content

Commit

Permalink
refactor: update and reorder default types to organize
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Sep 27, 2019
1 parent 54f5656 commit cbe6103
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions please
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,11 @@ organize-commits() # $1 = diff_range, $2 = commit_types_csv
if [[ $COMMIT =~ ^([a-z]+)\(?([^\)]+)?\)?:\ (.+) ]]; then
type="${BASH_REMATCH[1]}" scope="${BASH_REMATCH[2]}" subject="${BASH_REMATCH[3]}"
if [[ "$scope" != "" ]]; then scope="**${scope^}**: "; fi

CHANGELOG[$type]="${CHANGELOG[$type]}- ${scope}${subject^}\n"
fi
done <<< `git log $1 --no-merges --oneline --pretty="$GCFMT" --grep "\[skip" --grep "skip\]" --grep "StyleCI" --invert-grep`
ORGANIZED=""
TYPES=(`echo ${2:-feat,fix,refactor,perf,docs,infra,chore} | tr ',' '\n'`)
ORGANIZED="" TYPES=(`echo ${2:-feat,fix,refactor,revert,perf,chore,infra,docs,build} | tr ',' '\n'`)
for TYPE in ${TYPES[@]}; do
if [[ "${CHANGELOG[$TYPE]}" != "" ]]; then
ORGANIZED="$ORGANIZED### ${LABELS[$TYPE]}\n${CHANGELOG[$TYPE]}\n"
Expand Down

0 comments on commit cbe6103

Please sign in to comment.