From 3843a246089d4498d16b363556c211388dc81cde Mon Sep 17 00:00:00 2001 From: Cecile Robert-Michon Date: Thu, 24 Jun 2021 14:40:26 -0700 Subject: [PATCH] :hammer: Add tests (:green_heart:) and chores (:hammer:) categories to release notes --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CONTRIBUTING.md | 12 +++++++----- VERSIONING.md | 4 +++- hack/tools/release/notes.go | 10 ++++++++++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 05eec42de161..73cdc2e95c7a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,5 @@ - + **What this PR does / why we need it**: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eeb28cb3799c..6e3750426108 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,11 +47,13 @@ come up, including gaps in documentation! 1. Fork the desired repo, develop and test your code changes. 1. Submit a pull request. 1. All code PR must be labeled with one of - - ⚠️ (:warning:, major or breaking changes) - - ✨ (:sparkles:, feature additions) - - 🐛 (:bug:, patch and bugfixes) - - 📖 (:book:, documentation or proposals) - - 🌱 (:seedling:, minor or other) + - ⚠️ (`:warning:`, major or breaking changes) + - ✨ (`:sparkles:`, feature additions) + - 🐛 (`:bug:`, patch and bugfixes) + - 📖 (`:book:`, documentation or proposals) + - 🌱 (`:seedling:`, minor or other) + - 💚 (`:green_heart:`, tests) + - 🔨 (`:hammer:` chores, infra, maintenance - these will _not_ appear in release notes) All changes must be code reviewed. Coding conventions and standards are explained in the official [developer docs](https://git.k8s.io/community/contributors/devel). Expect reviewers to request that you diff --git a/VERSIONING.md b/VERSIONING.md index 7b31bae0c577..d27e7f285136 100644 --- a/VERSIONING.md +++ b/VERSIONING.md @@ -61,7 +61,9 @@ a: - Non-breaking feature: :sparkles: (`:sparkles:`) - Patch fix: :bug: (`:bug:`) - Docs: :book: (`:book:`) -- Infra/Tests/Other: :seedling: (`:seedling:`) +- Tests: :green_heart: (`:green_heart:`) +- Minor/Other: :seedling: (`:seedling:`) +- Chores/Infra/Maintenance: :hammer: (`:hammer:`) - these will _not_ appear in release notes You can also use the equivalent emoji directly, since GitHub doesn't render the `:xyz:` aliases in PR titles. diff --git a/hack/tools/release/notes.go b/hack/tools/release/notes.go index 9400111179c1..e79a71e91a09 100644 --- a/hack/tools/release/notes.go +++ b/hack/tools/release/notes.go @@ -40,6 +40,7 @@ const ( documentation = ":book: Documentation" proposals = ":memo: Proposals" warning = ":warning: Breaking Changes" + tests = ":green_heart: Testing" other = ":seedling: Others" unknown = ":question: Sort these by hand" ) @@ -50,6 +51,7 @@ var ( warning, features, bugs, + tests, other, documentation, unknown, @@ -91,6 +93,7 @@ func run() int { merges := map[string][]string{ features: {}, bugs: {}, + tests: {}, documentation: {}, warning: {}, other: {}, @@ -124,6 +127,9 @@ func run() int { body := strings.TrimSpace(c.body) var key, prNumber, fork string switch { + case strings.HasPrefix(body, ":hammer:"), strings.HasPrefix(body, "🔨"): + // do nothing for chores, we exclude them from release notes + continue case strings.HasPrefix(body, ":sparkles:"), strings.HasPrefix(body, "✨"): key = features body = strings.TrimPrefix(body, ":sparkles:") @@ -147,6 +153,10 @@ func run() int { key = warning body = strings.TrimPrefix(body, ":warning:") body = strings.TrimPrefix(body, "⚠️") + case strings.HasPrefix(body, ":green_heart:"), strings.HasPrefix(body, "💚"): + key = tests + body = strings.TrimPrefix(body, ":green_heart:") + body = strings.TrimPrefix(body, "💚") default: key = unknown }