Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: Add security section to release notes #5636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/release/check_commit_metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions scripts/release/generate_release_notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -83,6 +84,7 @@ declare -a section_order=(

declare -A section_titles=(
[breaking]='BREAKING CHANGES'
[security]='SECURITY'
[feat]='Features'
[fix]='Bug Fixes'
[docs]='Documentation'
Expand Down