Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/pr-version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
$isBotBumpPr = ($env:PR_AUTHOR -eq 'github-actions[bot]') -and ($env:HEAD_REF -like 'bot/bump-*' -or $env:HEAD_REF -like 'bot/promote-*')

$labels = $env:LABELS_JSON | ConvertFrom-Json
$isBreaking = $labels -contains 'breaking-change'
$isBreaking = $labels -contains 'breaking change'
$isManualEdit = $labels -contains 'manual-version-edit'

# Reject any human-authored PR that touches version.json unless explicitly
Expand Down Expand Up @@ -84,11 +84,11 @@ jobs:
# Unconditional check: if this PR changes the major in version.json, it MUST be
# labeled breaking-change. Catches unlabeled major-version edits.
if ($headMajor -ne $baseMajor -and -not $isBreaking) {
throw "This PR changes version.json's major from $baseMajor to $headMajor but is not labeled 'breaking-change'. Major-version changes must be tagged."
throw "This PR changes version.json's major from $baseMajor to $headMajor but is not labeled 'breaking change'. Major-version changes must be tagged."
}

if (-not $isBreaking) {
Write-Host "PR is not labeled 'breaking-change' and does not change the major; no further checks."
Write-Host "PR is not labeled 'breaking change' and does not change the major; no further checks."
exit 0
}

Expand Down Expand Up @@ -122,9 +122,9 @@ jobs:
$expectedMajor = $latestMajor + 1
if ($headMajor -ne $expectedMajor) {
if ($headMajor -le $latestMajor) {
$msg = "PR is labeled breaking-change but its version.json major ($headMajor) is not greater than the latest stable release major ($latestMajor; tag '$latestStable'). Run the 'Bump main to next major preview' workflow with next_major=$expectedMajor first, then rebase this PR onto the updated main."
$msg = "PR is labeled 'breaking change' but its version.json major ($headMajor) is not greater than the latest stable release major ($latestMajor; tag '$latestStable'). Run the 'Bump main to next major preview' workflow with next_major=$expectedMajor first, then rebase this PR onto the updated main."
} else {
$msg = "PR is labeled breaking-change but its version.json major ($headMajor) skips past major $expectedMajor. Main must be at exactly latest_stable_major + 1 ($latestMajor + 1 = $expectedMajor). Reset main to $expectedMajor.0-preview.{height} before merging this PR."
$msg = "PR is labeled 'breaking change' but its version.json major ($headMajor) skips past major $expectedMajor. Main must be at exactly latest_stable_major + 1 ($latestMajor + 1 = $expectedMajor). Reset main to $expectedMajor.0-preview.{height} before merging this PR."
}
throw $msg
}
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "9.5-preview.{height}",
"version": "10.0-preview.{height}",
"publicReleaseRefSpec": [
"^refs/heads/main$", // main publishes pre-release packages
"^refs/heads/release/\\d+\\.x$" // release/<major>.x branches publish stable packages
Expand Down
Loading