Skip to content

Commit 219538f

Browse files
authored
Add kind/breaking label for breaking changes in release notes (#79)
Breaking changes are currently invisible in the generated release notes: they land in Features or Refactors like any other PR. Add a dedicated kind/breaking label and a "Breaking Changes" section. - release.yml: the section is listed FIRST, so a PR that is both a feature and a breaking change surfaces as breaking. GitHub's release-notes config is static and cannot key off the version being cut, but the section is self-gating: it only renders when a PR in the range carries the label. - labels.sh: kind/breaking in red (b60205) rather than the kind/* blue, so it stands out on the PR list. The older unnamespaced "breaking change" label is left untouched. - pull_request_template.md: note that a breaking change belongs in a major release and that the PR summary should describe the upgrade path. Labels are not synced automatically — run .github/labels.sh after merge.
1 parent 1215f71 commit 219538f

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/labels.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ set -euo pipefail
2323
# documentation, ...):
2424
# kind/* -> blue (0052cc)
2525
# exclusion marker -> grey (ededed)
26+
#
27+
# kind/breaking is the one deliberate exception: red (b60205), because it is the
28+
# label a reviewer most needs to spot on a PR list. Note the repo also has an
29+
# older, unnamespaced "breaking change" label in the same red; that one is left
30+
# alone here — kind/breaking is the one that drives the release notes.
2631
labels=(
32+
"kind/breaking|b60205|Breaking change — requires action from users when upgrading"
2733
"kind/feature|0052cc|New user-facing functionality"
2834
"kind/bug|0052cc|A confirmed bug fix"
2935
"kind/refactor|0052cc|Internal refactor with no behavior change"

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ Set a label on this PR so it is categorized in the release notes. This is
1212
required — the "require-release-label" check fails without one.
1313
Some labels (kind/documentation, kind/test, kind/ci, kind/build) are applied
1414
automatically from the files you changed; set the rest yourself.
15+
16+
A PR lands in only the FIRST matching release-notes section, and Breaking
17+
Changes comes first — so a breaking feature is listed there rather than under
18+
Features. That is intended: it is the section people read when upgrading.
1519
-->
1620
- [ ] I have set a `kind/*` label describing the change (e.g. `kind/feature`, `kind/bug`, `kind/refactor`), or `skip-changelog` if it should be left out of the notes.
21+
- [ ] If this is a breaking change, I have set `kind/breaking`. Breaking changes belong in a **major** release, and the summary above should describe what users must do to upgrade — it ends up in the release notes.
1722

1823
## Checklist
1924

.github/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ changelog:
1313
labels:
1414
- skip-changelog
1515
categories:
16+
# Breaking Changes is deliberately first. A breaking change is often also a
17+
# feature or a bug fix, and since a PR lands in only the FIRST matching
18+
# category it is listed here instead of there — that is the section readers
19+
# of a major release need to see, and it keeps it from being buried.
20+
#
21+
# There is no way to make a category depend on the version being released:
22+
# .github/release.yml is static config. The section is self-gating instead —
23+
# it only appears when a PR in the release range carries kind/breaking.
24+
- title: ⚠️ Breaking Changes
25+
labels:
26+
- kind/breaking
1627
- title: 🚀 Features
1728
labels:
1829
- kind/feature

0 commit comments

Comments
 (0)