From 74c609527250f0c39d4c7a08b41e01a06a96fb07 Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Mon, 17 Oct 2022 12:57:33 -0400 Subject: [PATCH 1/6] chore: verbose release notes Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- hack/generate-release-notes.sh | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/hack/generate-release-notes.sh b/hack/generate-release-notes.sh index cc0d4829cc930..613a903a8c881 100755 --- a/hack/generate-release-notes.sh +++ b/hack/generate-release-notes.sh @@ -103,3 +103,67 @@ if [ "$new_contributors_num" -lt 20 ] && [ "$new_contributors_num" -gt 0 ]; then echo "$new_contributors_names" echo fi + +# Adapted from https://stackoverflow.com/a/67029088/684776 +less_log=$(git log --pretty="format:%s %ae" --cherry-pick --left-only --no-merges "$new_ref...$old_ref") +more_log=$(git log --pretty="format:%s %ae" "$new_ref..$old_ref") + +new_commits=$(diff --new-line-format="" --unchanged-line-format="" <(echo "$less_log") <(echo "$more_log") | grep -v "Merge pull request from GHSA") +new_commits_no_email=$(echo "$new_commits" | strip_last_word) +features=$(echo "$new_commits_no_email" | grep '^feat' | to_list_items) +fixes=$(echo "$new_commits_no_email" | grep '^fix' | to_list_items) +docs=$(echo "$new_commits_no_email" | grep '^docs' | to_list_items) +other=$(echo "$new_commits_no_email" | grep -v -e '^feat' -e '^fix' -e '^docs' | to_list_items) + +contributors_num=$(echo "$new_commits" | only_last_word | sort -u | nonempty_line_count) + +new_commits_num=$(echo "$new_commits" | nonempty_line_count) +features_num=$(echo "$features" | nonempty_line_count) +fixes_num=$(echo "$fixes" | nonempty_line_count) +docs_num=$(echo "$docs" | nonempty_line_count) +other_num=$(echo "$other" | nonempty_line_count) + +previous_contributors=$(git log --pretty="format:%an %ae" "$old_ref" | sort -uf) +all_contributors=$(git log --pretty="format:%an %ae" "$new_ref" | sort -uf) +new_contributors=$(diff --new-line-format="" --unchanged-line-format="" <(echo "$all_contributors") <(echo "$previous_contributors")) +new_contributors_num=$(echo "$new_contributors" | only_last_word | nonempty_line_count) # Count contributors by email +new_contributors_names=$(echo "$new_contributors" | strip_last_word | to_list_items) + +new_contributors_message="" +if [ "$new_contributors_num" -gt 0 ]; then + new_contributors_message=" ($new_contributors_num of them new)" +fi + +echo "## Changes" +echo +echo "This release includes $new_commits_num contributions from $contributors_num contributors$new_contributors_message with $features_num features and $fixes_num bug fixes." +echo +if [ "$new_contributors_num" -lt 20 ] && [ "$new_contributors_num" -gt 0 ]; then + echo "A special thanks goes to the $new_contributors_num new contributors:" + echo "$new_contributors_names" + echo +fi +if [ "$features_num" -gt 0 ]; then + echo "### Features" + echo + echo "$features" + echo +fi +if [ "$fixes_num" -gt 0 ]; then + echo "### Bug fixes" + echo + echo "$fixes" + echo +fi +if [ "$docs_num" -gt 0 ]; then + echo "### Documentation" + echo + echo "$docs" + echo +fi +if [ "$other_num" -gt 0 ]; then + echo "### Other" + echo + echo "$other" + echo +fi From c9919873493cb4303e85d96734db9194de513323 Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Mon, 17 Oct 2022 19:39:51 -0400 Subject: [PATCH 2/6] fix duplication Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- hack/generate-release-notes.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hack/generate-release-notes.sh b/hack/generate-release-notes.sh index 613a903a8c881..3c88278436c46 100755 --- a/hack/generate-release-notes.sh +++ b/hack/generate-release-notes.sh @@ -94,16 +94,6 @@ if [ "$new_contributors_num" -gt 0 ]; then new_contributors_message=" ($new_contributors_num of them new)" fi -echo "## Changes" -echo -echo "This release includes $new_commits_num contributions from $contributors_num contributors$new_contributors_message with $features_num features and $fixes_num bug fixes." -echo -if [ "$new_contributors_num" -lt 20 ] && [ "$new_contributors_num" -gt 0 ]; then - echo "A special thanks goes to the $new_contributors_num new contributors:" - echo "$new_contributors_names" - echo -fi - # Adapted from https://stackoverflow.com/a/67029088/684776 less_log=$(git log --pretty="format:%s %ae" --cherry-pick --left-only --no-merges "$new_ref...$old_ref") more_log=$(git log --pretty="format:%s %ae" "$new_ref..$old_ref") From 48b1e8dc490fd2e3d1c2d71bd68ef139a35cfe08 Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Tue, 1 Nov 2022 16:56:20 -0400 Subject: [PATCH 3/6] typo Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- hack/generate-release-notes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/generate-release-notes.sh b/hack/generate-release-notes.sh index 3c88278436c46..52070aae4f284 100755 --- a/hack/generate-release-notes.sh +++ b/hack/generate-release-notes.sh @@ -56,7 +56,7 @@ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/$v ## Release signatures -All Argo CD container images and CLI binaries are signed by cosign. See the [documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/signed-release-assets.md/) on how to verify the signatures. +All Argo CD container images and CLI binaries are signed by cosign. See the [documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/signed-release-assets/) on how to verify the signatures. \`\`\`shell -----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEesHEB7vX5Y2RxXypjMy1nI1z7iRG From d34e5356bc4afde545934397ac221322fed288a4 Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Tue, 29 Nov 2022 09:31:19 -0500 Subject: [PATCH 4/6] fix duplication Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- hack/generate-release-notes.sh | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/hack/generate-release-notes.sh b/hack/generate-release-notes.sh index 52070aae4f284..a739c2dfbe981 100755 --- a/hack/generate-release-notes.sh +++ b/hack/generate-release-notes.sh @@ -74,30 +74,6 @@ EOM less_log=$(git log --pretty="format:%s %ae" --cherry-pick --left-only --no-merges "$new_ref...$old_ref") more_log=$(git log --pretty="format:%s %ae" "$new_ref..$old_ref") -new_commits=$(diff --new-line-format="" --unchanged-line-format="" <(echo "$less_log") <(echo "$more_log") | grep -v "Merge pull request from GHSA") -new_commits_no_email=$(echo "$new_commits" | strip_last_word) - -contributors_num=$(echo "$new_commits" | only_last_word | sort -u | nonempty_line_count) - -new_commits_num=$(echo "$new_commits" | nonempty_line_count) -features_num=$(echo "$new_commits_no_email" | grep '^feat' | nonempty_line_count) -fixes_num=$(echo "$new_commits_no_email" | grep '^fix' | nonempty_line_count) - -previous_contributors=$(git log --pretty="format:%an %ae" "$old_ref" | sort -uf) -all_contributors=$(git log --pretty="format:%an %ae" "$new_ref" | sort -uf) -new_contributors=$(diff --new-line-format="" --unchanged-line-format="" <(echo "$all_contributors") <(echo "$previous_contributors")) -new_contributors_num=$(echo "$new_contributors" | only_last_word | nonempty_line_count) # Count contributors by email -new_contributors_names=$(echo "$new_contributors" | strip_last_word | to_list_items) - -new_contributors_message="" -if [ "$new_contributors_num" -gt 0 ]; then - new_contributors_message=" ($new_contributors_num of them new)" -fi - -# Adapted from https://stackoverflow.com/a/67029088/684776 -less_log=$(git log --pretty="format:%s %ae" --cherry-pick --left-only --no-merges "$new_ref...$old_ref") -more_log=$(git log --pretty="format:%s %ae" "$new_ref..$old_ref") - new_commits=$(diff --new-line-format="" --unchanged-line-format="" <(echo "$less_log") <(echo "$more_log") | grep -v "Merge pull request from GHSA") new_commits_no_email=$(echo "$new_commits" | strip_last_word) features=$(echo "$new_commits_no_email" | grep '^feat' | to_list_items) From a52c2807c8f81fba601a84a783909bc1b4a67133 Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Tue, 13 Dec 2022 09:59:06 -0500 Subject: [PATCH 5/6] updates from comments Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- hack/generate-release-notes.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hack/generate-release-notes.sh b/hack/generate-release-notes.sh index a739c2dfbe981..c58cbf24f243d 100755 --- a/hack/generate-release-notes.sh +++ b/hack/generate-release-notes.sh @@ -110,25 +110,25 @@ if [ "$new_contributors_num" -lt 20 ] && [ "$new_contributors_num" -gt 0 ]; then echo fi if [ "$features_num" -gt 0 ]; then - echo "### Features" + echo "### Features ($features_num)" echo echo "$features" echo fi if [ "$fixes_num" -gt 0 ]; then - echo "### Bug fixes" + echo "### Bug fixes ($fixes_num)" echo echo "$fixes" echo fi if [ "$docs_num" -gt 0 ]; then - echo "### Documentation" + echo "### Documentation ($docs_num)" echo echo "$docs" echo fi if [ "$other_num" -gt 0 ]; then - echo "### Other" + echo "### Other ($other_num)" echo echo "$other" echo From ff367efe4ae5a7f892550fdf70f98819b789d68d Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Tue, 13 Dec 2022 10:02:36 -0500 Subject: [PATCH 6/6] exclude bot commits Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- hack/generate-release-notes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/generate-release-notes.sh b/hack/generate-release-notes.sh index c58cbf24f243d..279c4c191c04b 100755 --- a/hack/generate-release-notes.sh +++ b/hack/generate-release-notes.sh @@ -79,7 +79,7 @@ new_commits_no_email=$(echo "$new_commits" | strip_last_word) features=$(echo "$new_commits_no_email" | grep '^feat' | to_list_items) fixes=$(echo "$new_commits_no_email" | grep '^fix' | to_list_items) docs=$(echo "$new_commits_no_email" | grep '^docs' | to_list_items) -other=$(echo "$new_commits_no_email" | grep -v -e '^feat' -e '^fix' -e '^docs' | to_list_items) +other=$(echo "$new_commits_no_email" | grep -v -e '^feat' -e '^fix' -e '^docs' -e '^\[Bot\]' | to_list_items) contributors_num=$(echo "$new_commits" | only_last_word | sort -u | nonempty_line_count)