Skip to content

Commit

Permalink
Merge PR #12410: dev/tools/make-changelog.sh now asks about fixed bugs
Browse files Browse the repository at this point in the history
Reviewed-by: SkySkimmer
Ack-by: Zimmi48
  • Loading branch information
SkySkimmer committed May 26, 2020
2 parents 7a72315 + 09a4ffe commit 1eb5f05
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dev/tools/make-changelog.sh
Expand Up @@ -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 <https://github.com/coq/coq/issues/\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 <https://github.com/coq/coq/pull/%s>`_,\n by %s).' - "$type_full" "$PR" "$PR" "$(git config user.name)" > "$where"
printf '%s **%s:**\n Bla bla\n (`#%s <https://github.com/coq/coq/pull/%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"
Expand Down
4 changes: 4 additions & 0 deletions 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 <https://github.com/coq/coq/pull/12410>`_, fixes `#12386
<https://github.com/coq/coq/issues/12386>`_, by Jason Gross).

0 comments on commit 1eb5f05

Please sign in to comment.