From 09a4ffe1d2add78c0773fb1d1d1313835ac71095 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Mon, 25 May 2020 19:08:01 -0400 Subject: dev/tools/make-changelog.sh now asks about fixed bugs Fixes #12386 --- dev/tools/make-changelog.sh | 8 +++++++- doc/changelog/08-tools/12410-add-fixes.rst | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 doc/changelog/08-tools/12410-add-fixes.rst diff --git a/dev/tools/make-changelog.sh b/dev/tools/make-changelog.sh index e1aed4560d..de58527cca 100755 --- a/dev/tools/make-changelog.sh +++ b/dev/tools/make-changelog.sh @@ -25,11 +25,17 @@ case "$type_first_letter" in exit 1;; esac +printf "Fixes? (space separated list of bug numbers)\n" +read -r fixes_list + +fixes_string="$(echo $fixes_list | sed 's/ /~ and /g; s,\([0-9]\+\),`#\1 `_,g' | tr '~' '\n')" +if [ ! -z "$fixes_string" ]; then fixes_string="$(printf '\n fixes %s,' "$fixes_string")"; fi + # shellcheck disable=SC2016 # the ` are regular strings, this is intended # use %s for the leading - to avoid looking like an option (not sure # if necessary but doesn't hurt) -printf '%s **%s:**\n Bla bla\n (`#%s `_,\n by %s).' - "$type_full" "$PR" "$PR" "$(git config user.name)" > "$where" +printf '%s **%s:**\n Bla bla\n (`#%s `_,%s\n by %s).' - "$type_full" "$PR" "$PR" "$fixes_string" "$(git config user.name)" > "$where" printf "Name of created changelog file:\n" printf "$where\n" diff --git a/doc/changelog/08-tools/12410-add-fixes.rst b/doc/changelog/08-tools/12410-add-fixes.rst new file mode 100644 index 0000000000..f4c41dc3c3 --- /dev/null +++ b/doc/changelog/08-tools/12410-add-fixes.rst @@ -0,0 +1,4 @@ +- **Changed:** + ``dev/tools/make-changelog.sh`` now asks for a list of bugs fixed by the PR + (`#12410 `_, fixes `#12386 + `_, by Jason Gross). -- cgit v1.2.3