From 68324c72630141889a2390fd2ca23af06b46ab55 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Mon, 9 Jan 2023 21:57:42 +0200 Subject: [PATCH] chore: Add security section to release notes (#5636) --- scripts/release/check_commit_metadata.sh | 6 ++++++ scripts/release/generate_release_notes.sh | 2 ++ 2 files changed, 8 insertions(+) diff --git a/scripts/release/check_commit_metadata.sh b/scripts/release/check_commit_metadata.sh index 3e6ab45110..76e781dd20 100755 --- a/scripts/release/check_commit_metadata.sh +++ b/scripts/release/check_commit_metadata.sh @@ -45,6 +45,9 @@ main() { breaking_label=release/breaking breaking_category=breaking + # Security related changes are labeled `security`. + security_label=security + # Get abbreviated and full commit hashes and titles for each commit. mapfile -t commits < <(git log --no-merges --pretty=format:"%h %H %s" "$range") @@ -100,6 +103,9 @@ main() { COMMIT_METADATA_CATEGORY[$commit_sha_short]=$breaking_category COMMIT_METADATA_BREAKING=1 continue + elif [[ ${labels[$commit_sha_long]} = *"label:$security_label"* ]]; then + COMMIT_METADATA_CATEGORY[$commit_sha_short]=$security_label + continue fi if [[ $commit_prefix =~ $prefix_pattern ]]; then diff --git a/scripts/release/generate_release_notes.sh b/scripts/release/generate_release_notes.sh index f89221602d..df6cfd98b9 100755 --- a/scripts/release/generate_release_notes.sh +++ b/scripts/release/generate_release_notes.sh @@ -68,6 +68,7 @@ mapfile -t commits < <(git log --no-merges --pretty=format:"%ct %h %s" "${old_ve # NOTE(mafredri): These need to be supported in check_commit_metadata.sh as well. declare -a section_order=( breaking + security feat fix docs @@ -83,6 +84,7 @@ declare -a section_order=( declare -A section_titles=( [breaking]='BREAKING CHANGES' + [security]='SECURITY' [feat]='Features' [fix]='Bug Fixes' [docs]='Documentation'