# Config for release-drafter/release-drafter, used two ways:
# - release-drafter.yml (the workflow) runs it live on every push to main, keeping a running
# DRAFT release as a human-readable cross-check -- this draft is never auto-published.
# - release-drafter.yml *also* runs the autolabeler on every PR open/reopen/sync -- it applies
# fix/feature/chore labels to the PR itself from its title/files, so a PR that merges without
# anyone manually labeling it still carries a real signal.
#
# release.yml does NOT call release-drafter any more. It resolves the real next version with
# .github/scripts/resolve_version.py, which reads the same labels the autolabeler applies. Keep
# the label vocabulary here and there in step. Two things learned the hard way (2026-09-11):
# - `major` is NEVER applied automatically. An earlier autolabeler rule matched the literal
# breaking-change marker anywhere in a PR body; Dependabot PR bodies quote the upstream
# project's release notes, one of which contained it, and three routine dependency bumps
# became 1.0.0, 1.0.1 and 1.0.2 on npm. resolve_version.py refuses a major outright.
# - `exclude-labels` below only hides chore/ci/docs/dependency PRs from the DRAFT NOTES. It does
# not make the version resolver say "nothing": `default: patch` still bumps, which is how
# 1.0.4 shipped for a workflow-only merge. The real "release nothing" decision is
# resolve_version.py's, not this file's.
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
exclude-labels:
- chore
- ci
- docs
- dependencies
categories:
- title: "Fixes"
labels:
- fix
- bug
- title: "Features"
labels:
- feature
- enhancement
change-template: "- $TITLE (#$NUMBER)"
change-title-escapes: '\<*_&'
autolabeler:
- label: "fix"
title:
- "/^fix/i"
- "/^Fix /"
- label: "feature"
title:
- "/^add/i"
- "/^feat/i"
- label: "chore"
title:
- "/^chore/i"
- "/^ci:/i"
- "/^docs/i"
- "/^build\\(deps\\)/"
files:
- "*.md"
- "docs/**"
- ".github/**"
version-resolver:
major:
labels:
- major
minor:
labels:
- minor
- feature
- enhancement
patch:
labels:
- patch
- fix
- bug
default: patch
template: |
## What's Changed
$CHANGES
Cross-check this against CHANGELOG.md's entry for this version (release.yml writes it
automatically unless a PR already bumped package.json and wrote its own).