Automatically generate contributors list in release notes.
Fixes
Closes
@@ -124,8 +124,9 @@ function __format_release_notes() {
# Create the release notes since commit $1 ($2...${[#]} are the cherry-picks,
# so the commits to ignore.
function __release_notes() {
+ local last_release=$1
local i
- local commits=$(__get_release_notes_commits $@)
+ local commits=$(__get_release_notes_commits $last_release)
local length="${#RELNOTES_TYPES[@]}"
__generate_release_notes "$commits"
for (( i=0; $i < $length; i=$i+1 )); do
@@ -140,6 +141,17 @@ function __release_notes() {
echo
fi
done
+
+ # Add a list of contributors to thank.
+ local external_authors=$(git log $last_release..HEAD --format="%aN <%aE>" \
+ | sort \
+ | uniq \
+ | grep -v "google.com" \
+ | sed -e 's/[[:space:]]$//' \
+ | tr '\n' ',' \
+ | sed -e 's/,$/\n/' \
+ | sed -e 's/,/, /g')
+ echo "This release contains contributions from many people at Google, as well as ${external_authors}."
}
# A wrapper around all the previous function, using the CHANGELOG.md
