fix: read CHANGELOG with absolute path so release notes populate

The SDK build step imported earlier in publish.ts does process.chdir into
packages/sdk/js and never restores it, so the relative path to
packages/kilo-vscode/CHANGELOG.md later in the release block resolved to a
missing file. The read silently fell through to an empty string and the
GitHub release body ended up as the 'No notable changes' default even
though the CHANGELOG in the release commit had all the entries.
Resolve the path relative to this script via fileURLToPath so it works
regardless of cwd.
This commit is contained in:
kiloconnect[bot]
2026-04-16 17:57:00 +00:00
parent f3708c55fb
commit 58336a6484
2 changed files with 11 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---
Fix GitHub release notes showing "No notable changes" when the CHANGELOG actually had entries for the version.
+6 -2
View File
@@ -105,9 +105,13 @@ if (Script.release) {
// kilocode_change end
// kilocode_change start - mark prerelease GitHub releases accordingly
// and populate release notes from the changelog updated by changeset above
// and populate release notes from the changelog updated by changeset above.
// Use an absolute path for the CHANGELOG because the imported SDK build
// script chdirs into packages/sdk/js, so a relative path would miss the file
// and fall through to the "No notable changes" default.
const flags = Script.preview ? ["--draft=false", "--prerelease"] : ["--draft=false"]
const changelog = await Bun.file("packages/kilo-vscode/CHANGELOG.md")
const changelogPath = fileURLToPath(new URL("../packages/kilo-vscode/CHANGELOG.md", import.meta.url))
const changelog = await Bun.file(changelogPath)
.text()
.catch(() => "")
const body = extractLatestSection(changelog) || "No notable changes"