From e2f76b488a17d4b6062754939449090b57373f18 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Tue, 6 Oct 2026 20:23:26 +0200 Subject: [PATCH] Move the release-drafter config to the category model release-drafter 7.7.0 deprecates exclude-labels, category labels and version-resolver (release-drafter/release-drafter#1558). The old `default: patch` needs no replacement: patch is the drafter's own fallback. --- .github/release-drafter.yml | 58 ++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a3ea5d3..3b2abfe 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -9,10 +9,11 @@ # always applies dependencies alongside them, and that is categorised. # Note that `categories` is an array: a repo that overrides it via _extends # replaces the whole array rather than appending to it. -# $RESOLVED_VERSION follows the version-resolver below, so a PR labelled -# enhancement drafts a minor and a PR labelled bug drafts a patch. The previous -# $NEXT_PATCH_VERSION always drafted a patch, which meant every minor release in -# the org had to be retitled by hand before publishing. +# $RESOLVED_VERSION follows the semver-increment of each category, so a PR +# labelled enhancement drafts a minor and a PR labelled bug drafts a patch. The +# previous $NEXT_PATCH_VERSION always drafted a patch, which meant every minor +# release in the org had to be retitled by hand before publishing. A PR with no +# categorised label drafts a patch, release-drafter's own fallback. # # tag-template here is a fallback with no artifact prefix, and no repo should # rely on it: every repo tags as -, so each one overrides @@ -24,40 +25,45 @@ tag-template: $RESOLVED_VERSION version-template: $MAJOR.$MINOR.$PATCH categories: + - type: pre-exclude + when: + labels: [reverted, skip-changelog] - title: ":boom: Breaking changes" - labels: [breaking] + semver-increment: major + when: + labels: [breaking] - title: 🚨 Removed - labels: [removed] + semver-increment: minor + when: + labels: [removed] - title: 🚀 New features and improvements - labels: [enhancement] + semver-increment: minor + when: + labels: [enhancement] - title: 🐛 Bug Fixes - labels: [bug] + semver-increment: patch + when: + labels: [bug] - title: 📝 Documentation updates - labels: [documentation] + semver-increment: patch + when: + labels: [documentation] - title: 👻 Maintenance - labels: [maintenance] + semver-increment: patch + when: + labels: [maintenance] - title: 🔧 Build - labels: [build] + semver-increment: patch + when: + labels: [build] # Applied automatically by Dependabot. This is ~85% of all labelled items in # the org, so it is collapsed behind a summary line rather than being allowed # to bury every other category. - title: 📦 Dependency updates - labels: [dependencies] + semver-increment: patch collapse-after: 10 - -exclude-labels: - - reverted - - skip-changelog - -# Derive the next version from the labels already being applied. -version-resolver: - major: - labels: [breaking] - minor: - labels: [enhancement, removed] - patch: - labels: [bug, documentation, maintenance, build, dependencies] - default: patch + when: + labels: [dependencies] change-template: '- $TITLE ([#$NUMBER]($URL)) @$AUTHOR'