diff options
| author | Théo Zimmermann | 2019-10-11 15:46:51 +0200 |
|---|---|---|
| committer | Théo Zimmermann | 2019-10-11 15:46:51 +0200 |
| commit | 649ee5836fe73d5c4e067906092b856c4b6337c2 (patch) | |
| tree | 26fa32acd98c0a6a99ed768957dcef6aa5be1887 /dev | |
| parent | da116bcf6ed437743775ef09ff2e44217400f48c (diff) | |
| parent | bb39aeddaa38d9273c6eab1377edbdad6c5e53c4 (diff) | |
Merge PR #10828: Simple script to prefill a changelog entry
Reviewed-by: Zimmi48
Diffstat (limited to 'dev')
| -rwxr-xr-x | dev/tools/make-changelog.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/dev/tools/make-changelog.sh b/dev/tools/make-changelog.sh new file mode 100755 index 0000000000..ea96de970a --- /dev/null +++ b/dev/tools/make-changelog.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +echo "PR number" +read -r PR + +echo "Where? (type a prefix)" +(cd doc/changelog && ls -d */) +read -r where + +where=$(echo doc/changelog/"$where"*) +where="$where/$PR-$(git rev-parse --abbrev-ref HEAD).rst" + +# 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 bla bla (`#%s <https://github.com/coq/coq/pull/%s>`_, by %s).' - "$PR" "$PR" "$(git config user.name)" > "$where" + +giteditor=$(git config core.editor) +if [ "$giteditor" ]; then + $giteditor "$where" +elif [ "$EDITOR" ]; then + $EDITOR "$where" +else echo "$where" +fi |
