Skip to content

Commit e82364a

Browse files
committed
ci(release): replace changesets with label-driven release automation
1 parent b294c29 commit e82364a

19 files changed

Lines changed: 8957 additions & 12956 deletions

.github/labels.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
- name: "automation: lane-sync"
1818
color: "bfd4f2"
1919
description: "Automation PR carrying a hotfix into another release lane"
20-
- name: "automation: changeset-cleanup"
21-
color: "d4c5f9"
22-
description: "Automation PR removing hotfix changesets after stable consumption"
2320
- name: "ignore-for-release"
2421
color: "6a737d"
2522
description: "Exclude this PR from generated release notes"
@@ -28,6 +25,18 @@
2825
- name: "release: hotfix"
2926
color: "b60205"
3027
description: "Direct-lane hotfix PR intended for expedited release propagation"
28+
- name: "release:bump:none"
29+
color: "c2e0c6"
30+
description: "Release-impacting PR with no version bump"
31+
- name: "release:bump:patch"
32+
color: "bfdadc"
33+
description: "Release-impacting PR that should produce a patch release"
34+
- name: "release:bump:minor"
35+
color: "fbca04"
36+
description: "Release-impacting PR that should produce a minor release"
37+
- name: "release:bump:major"
38+
color: "b60205"
39+
description: "Release-impacting PR that should produce a major release"
3140

3241
# Issue Types
3342
- name: "type: bug"

.github/pull_request_template.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ Allowed `type`: `build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor
1010
Optional `scope`: any lowercase kebab-case token (examples: `api`, `frontend`, `backend`, `electron`, `provider`, `agent`, `tools`, `infra`, `deps`)
1111

1212
Breaking change note:
13+
1314
- Add `!` before `:` to mark breaking intent, for example: `feat(api)!: remove legacy config format`
1415
- Automation adds `type: breaking` when `!` is present
15-
- Changesets still determine actual version bump behavior
16+
- Maintainers must apply exactly one `release:bump:*` label for release-impacting `Project/**` changes
1617

1718
Branch naming note:
19+
1820
- `proto` is allowed for branch names only (`username/proto/short-description`), not as a PR title type
1921

2022
## Summary
@@ -45,10 +47,10 @@ Branch naming note:
4547
- [ ] For normal work, base branch is `dev`.
4648
- [ ] If targeting `prev` or `main`, this is a promotion/release PR requested by a maintainer.
4749

48-
## Changeset Check
50+
## Release Check
4951

50-
- [ ] This PR touches non-doc files in `Project/**` and includes the required changeset in `Project/.changeset/` (applies to `dev`, `prev`, and `main`).
51-
- [ ] No changeset is required because this PR is docs-only in `Project/**` (markdown/docs paths) or does not change `Project/**`.
52+
- [ ] This PR touches release-impacting files in `Project/**`, and exactly one `release:bump:none|patch|minor|major` label is applied.
53+
- [ ] No release bump label is required because this PR is docs-only in `Project/**` (markdown/docs paths) or does not change `Project/**`.
5254

5355
## Validation
5456

@@ -88,7 +90,8 @@ Branch naming note:
8890
> I hereby swear I used AI responsibly and verified these changes are correct (not blind AI copy/apply slop).
8991
9092
> [!IMPORTANT]
91-
> - [ ] I hereby swear to have only used AI in things I have *enough* expertise in.
93+
>
94+
> - [ ] I hereby swear to have only used AI in things I have _enough_ expertise in.
9295
9396
<!--
9497
## Get in Touch

.github/scripts/hotfix-sync-metadata.mjs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const HOTFIX_SYNC_METADATA_MARKER = "hotfix-sync-metadata";
2+
const RELEASE_BUMP_VALUES = new Set(["none", "patch", "minor", "major"]);
23

34
function normalizeString(value) {
45
return typeof value === "string" ? value.trim() : "";
@@ -24,6 +25,11 @@ function normalizeNumber(value) {
2425
return null;
2526
}
2627

28+
function normalizeReleaseBump(value) {
29+
const normalized = normalizeString(value).toLowerCase();
30+
return RELEASE_BUMP_VALUES.has(normalized) ? normalized : "none";
31+
}
32+
2733
export function normalizeHotfixSyncMetadata(value) {
2834
if (!value || typeof value !== "object") {
2935
throw new Error("Hotfix sync metadata must be an object.");
@@ -37,7 +43,8 @@ export function normalizeHotfixSyncMetadata(value) {
3743
const originBase = normalizeString(value.origin_base);
3844
const originHead = normalizeString(value.origin_head);
3945
const originMergeSha = normalizeString(value.origin_merge_sha);
40-
const changesetFiles = normalizeStringArray(value.changeset_files);
46+
const carriedLabels = normalizeStringArray(value.carried_labels);
47+
const releaseBump = normalizeReleaseBump(value.release_bump);
4148

4249
if (!originBase || !originHead || !originMergeSha) {
4350
throw new Error(
@@ -50,8 +57,8 @@ export function normalizeHotfixSyncMetadata(value) {
5057
origin_base: originBase,
5158
origin_head: originHead,
5259
origin_merge_sha: originMergeSha,
53-
changeset_files: changesetFiles,
54-
changeset_consumed_by_main: value.changeset_consumed_by_main === true,
60+
release_bump: releaseBump,
61+
carried_labels: carriedLabels,
5562
};
5663
}
5764

0 commit comments

Comments
 (0)