From f5f1eebf63c61944ad84c90f677f0b88e665dc36 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 10 Apr 2018 20:34:26 -0400 Subject: [PATCH] fix: ensure we _always_ include all types in history output In some cases, we might miss pull requests where there is more than one 'type' label, causing that pull request to be omitted from the history. This change ensures we always include pull requests in the change log --- contrib/release | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/contrib/release b/contrib/release index dc06aeddc..2251be18e 100755 --- a/contrib/release +++ b/contrib/release @@ -237,7 +237,7 @@ fn-repo-update-history-and-commit() { declare desc="Updates the history file and commits the changes" declare CURRENT_VERSION="$1" NEXT_VERSION="$2" local PULL_REQUEST_ID TITLE AUTHOR TYPE CHANGELOG_TEXT - local COMMIT_MESSAGE HISTORY HISTORY_CONTENTS HISTORY_DOCUMENTATION HISTORY_ENHANCEMENT HISTORY_BUG ISSUE_FILE + local COMMIT_MESSAGE HISTORY HISTORY_CONTENTS HISTORY_DOCUMENTATION HISTORY_ENHANCEMENT HISTORY_BUG HISTORY_OTHER ISSUE_FILE pushd "$ROOT_DIR" >/dev/null @@ -258,8 +258,10 @@ fn-repo-update-history-and-commit() { HISTORY_BUG="${HISTORY_BUG}"$'\n'"$CHANGELOG_TEXT" elif [[ "$TYPE" == "documentation" ]]; then HISTORY_DOCUMENTATION="${HISTORY_DOCUMENTATION}"$'\n'"$CHANGELOG_TEXT" - elif [[ "$TYPE" == "enhancement" ]]; then + elif [[ "$TYPE" == "enhancement" ]] || [[ "$TYPE" == "refactor" ]]; then HISTORY_ENHANCEMENT="${HISTORY_ENHANCEMENT}"$'\n'"$CHANGELOG_TEXT" + else + HISTORY_OTHER="${HISTORY_OTHER}"$'\n'"$CHANGELOG_TEXT" fi done @@ -281,6 +283,11 @@ fn-repo-update-history-and-commit() { HISTORY="${HISTORY}"$'\n'"$HISTORY_DOCUMENTATION" fi + if [[ "$HISTORY_OTHER" ]]; then + HISTORY="${HISTORY}"$'\n\n'"### Other" + HISTORY="${HISTORY}"$'\n'"$HISTORY_OTHER" + fi + sed -i.bak '1d' HISTORY.md && rm HISTORY.md.bak HISTORY_CONTENTS="$(cat HISTORY.md)" echo -e "$HISTORY\n$HISTORY_CONTENTS" >HISTORY.md