diff options
| author | Gaëtan Gilbert | 2019-10-05 11:37:51 +0200 |
|---|---|---|
| committer | Gaëtan Gilbert | 2019-10-11 13:30:44 +0200 |
| commit | bb39aeddaa38d9273c6eab1377edbdad6c5e53c4 (patch) | |
| tree | 391085db67689a261efb5cd8be113226d05f59d4 | |
| parent | 53e8533b58a22584a642447123ae4aecfdf665a3 (diff) | |
Simple script to prefill a changelog entry
| -rw-r--r-- | .github/CODEOWNERS | 3 | ||||
| -rwxr-xr-x | dev/tools/make-changelog.sh | 25 |
2 files changed, 28 insertions, 0 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6c7b7a9a1c..4789d9b6fa 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -333,6 +333,9 @@ azure-pipelines.yml @coq/ci-maintainers /dev/tools/github-check-prs.py @SkySkimmer +/dev/tools/make-changelog.sh @SkySkimmer +# Secondary maintainer @Zimmi48 + /dev/tools/merge-pr.sh @maximedenes # Secondary maintainer @gares 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 |
