Repository navigation
fix(release): generate GitHub notes from pending changelog - #13064
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughThe release utility now reads pending changelogs to generate ChangesRelease description flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested labels: Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant ReleaseJob
participant ReleaseTextUtility
participant RELEASEmd
participant GitHubReleasesAPI
ReleaseJob->>ReleaseTextUtility: run make-release-description
ReleaseTextUtility->>RELEASEmd: write generated description
ReleaseJob->>GitHubReleasesAPI: create draft release using RELEASE.md
ReleaseJob->>GitHubReleasesAPI: fetch release body by created ID
GitHubReleasesAPI-->>ReleaseJob: return description for validation
ReleaseJob->>GitHubReleasesAPI: publish verified release
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoFix release notes generation to use pending changelog and fail on empties
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
PR Code Suggestions ✨Latest suggestions up to 2650a9e Warning
Previous suggestionsSuggestions up to commit 2650a9e
|
|||||||||||||||||||||||
Confidence Score: 5/5The change is safe to merge — logic is correctly scoped to the release pipeline, failures degrade gracefully to a diagnostic body, and the draft-then-publish sequence is functionally sound. The two issues raised in previous review threads are addressed: the release is created as a draft and published only after the body is validated. The async fallback for missing changelogs is also in place. The core logic flows correctly: atomic temp-write, normalizeNewlines comparison, and the test -s RELEASE.md guard all behave as intended. No files require special attention. Reviews (4): Last reviewed commit: "fix(release): normalize verified release..." | Re-trigger Greptile |
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
pnpm11/__utils__/get-release-text/test/main.ts (1)
11-33: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdopt asynchronous filesystem APIs in tests.
While synchronous filesystem operations are common for brevity in tests, as per coding guidelines, preferring asynchronous filesystem APIs and
async/awaitis recommended across the repository.♻️ Proposed refactor to use `fs.promises`
-beforeEach(() => { - workspaceDir = fs.mkdtempSync(path.join(os.tmpdir(), 'get-release-text-')) +beforeEach(async () => { + workspaceDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), 'get-release-text-')) }) -afterEach(() => { - fs.rmSync(workspaceDir, { recursive: true, force: true }) +afterEach(async () => { + await fs.promises.rm(workspaceDir, { recursive: true, force: true }) }) test('writes the parked registry changelog section', async () => { const pnpmDir = path.join(workspaceDir, 'pnpm11/pnpm') - fs.mkdirSync(pnpmDir, { recursive: true }) - fs.writeFileSync(path.join(pnpmDir, 'package.json'), JSON.stringify({ name: 'pnpm', version: '11.13.1' })) - fs.writeFileSync(path.join(pnpmDir, 'CHANGELOG.md'), '# pnpm\n\n## 11.13.0\n\nOld release.\n') + await fs.promises.mkdir(pnpmDir, { recursive: true }) + await fs.promises.writeFile(path.join(pnpmDir, 'package.json'), JSON.stringify({ name: 'pnpm', version: '11.13.1' })) + await fs.promises.writeFile(path.join(pnpmDir, 'CHANGELOG.md'), '# pnpm\n\n## 11.13.0\n\nOld release.\n') const pendingDir = path.join(workspaceDir, '.changeset/changelogs') - fs.mkdirSync(pendingDir, { recursive: true }) - fs.writeFileSync(path.join(pendingDir, '[email protected]'), '## 11.13.1\n\n### Patch Changes\n\n- Fixed the release notes.\n') + await fs.promises.mkdir(pendingDir, { recursive: true }) + await fs.promises.writeFile(path.join(pendingDir, '[email protected]'), '## 11.13.1\n\n### Patch Changes\n\n- Fixed the release notes.\n') await writeReleaseText(workspaceDir) - const release = fs.readFileSync(path.join(workspaceDir, 'RELEASE.md'), 'utf8') + const release = await fs.promises.readFile(path.join(workspaceDir, 'RELEASE.md'), 'utf8') expect(release).toContain('Fixed the release notes.') expect(release).not.toContain('Old release.') })🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm11/__utils__/get-release-text/test/main.ts` around lines 11 - 33, Update the test lifecycle hooks and test body around `beforeEach`, `afterEach`, and `writes the parked registry changelog section` to use asynchronous `fs.promises` filesystem APIs with `await`, including temporary-directory creation, directory removal, directory creation, file writes, and release-file reading. Preserve the existing test setup, assertions, and cleanup behavior.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 335-350: Update the github-release step to create the release as a
draft, then make Verify published release description fetch the persisted GitHub
body and compare it exactly with RELEASE.md rather than only checking its
length. After that verification succeeds, publish the draft using the verified
release ID, ensuring any API failure or content mismatch leaves the release
unpublished.
In `@pnpm11/__utils__/get-release-text/src/main.ts`:
- Around line 26-33: Update writeReleaseText to use asynchronous fs.promises
APIs for reading package and changelog files and for writing RELEASE.md. Replace
the direct writeFileSync call with an atomic temporary-file write followed by
rename, ensuring failures do not leave a partially written RELEASE.md while
preserving the existing release.content output.
---
Nitpick comments:
In `@pnpm11/__utils__/get-release-text/test/main.ts`:
- Around line 11-33: Update the test lifecycle hooks and test body around
`beforeEach`, `afterEach`, and `writes the parked registry changelog section` to
use asynchronous `fs.promises` filesystem APIs with `await`, including
temporary-directory creation, directory removal, directory creation, file
writes, and release-file reading. Preserve the existing test setup, assertions,
and cleanup behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 41680f10-7550-4ff3-9938-78f37c21be67
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!pnpm-lock.yaml
📒 Files selected for processing (6)
.github/workflows/release.ymlpnpm11/__utils__/get-release-text/package.jsonpnpm11/__utils__/get-release-text/src/main.tspnpm11/__utils__/get-release-text/test/main.tspnpm11/__utils__/get-release-text/test/tsconfig.jsonpnpm11/__utils__/get-release-text/tsconfig.json
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.8301154842599994,
"stddev": 0.1844899269356852,
"median": 2.7793422985599996,
"user": 2.7545011799999997,
"system": 2.0954042399999997,
"min": 2.5119507950599997,
"max": 3.0787108440599997,
"times": [
2.76444336306,
2.86576794906,
2.73424841206,
3.0396580690599997,
2.79424123406,
2.75124935106,
3.07023892406,
3.0787108440599997,
2.69064590106,
2.5119507950599997
]
},
{
"command": "pacquet@main",
"mean": 3.0810376753599997,
"stddev": 0.33138696347703406,
"median": 3.18585704106,
"user": 3.2757882799999996,
"system": 2.58250974,
"min": 2.5437656350599998,
"max": 3.53057169606,
"times": [
2.97509922106,
2.6954125050599997,
2.5437656350599998,
2.72131717706,
3.18654838406,
3.25061890206,
3.53057169606,
3.3817118270599997,
3.1851656980599996,
3.34016570806
]
},
{
"command": "pnpr@HEAD",
"mean": 1.7516183699599999,
"stddev": 0.23542512038230234,
"median": 1.76456031156,
"user": 1.7250529799999998,
"system": 1.9091598399999998,
"min": 1.47245371306,
"max": 2.08584126406,
"times": [
1.78487650606,
1.87070106806,
2.00756183706,
1.50219146106,
1.51119432106,
1.47245371306,
2.08584126406,
2.00066666706,
1.53645274506,
1.74424411706
]
},
{
"command": "pnpr@main",
"mean": 1.7168229752600002,
"stddev": 0.20020935022180136,
"median": 1.70426253806,
"user": 1.79858008,
"system": 1.92430354,
"min": 1.44127827306,
"max": 2.11737289006,
"times": [
1.5745978500600002,
2.11737289006,
1.71235451706,
1.85226089106,
1.69617055906,
1.8518443500600001,
1.44127827306,
1.8199813830600002,
1.52266778206,
1.5797012570600002
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.32317101828,
"stddev": 0.02152345081441738,
"median": 0.33056281468000004,
"user": 0.31672142,
"system": 0.80534056,
"min": 0.28549365968,
"max": 0.35294810368,
"times": [
0.35294810368,
0.28549365968,
0.33135843768,
0.30159414168000004,
0.32976719168,
0.30113360468,
0.31733416368,
0.33195249568,
0.34779005268,
0.33233833168000004
]
},
{
"command": "pacquet@main",
"mean": 0.30812590638000004,
"stddev": 0.020239435292040024,
"median": 0.30798835968000005,
"user": 0.30263512000000004,
"system": 0.7792024599999998,
"min": 0.27792772568,
"max": 0.34697639068,
"times": [
0.33331678368,
0.31125349668,
0.31205648768,
0.31066828568000004,
0.30530843368000005,
0.34697639068,
0.29611485668000004,
0.29815007768,
0.28948652568,
0.27792772568
]
},
{
"command": "pnpr@HEAD",
"mean": 0.33948907488,
"stddev": 0.032321570240589806,
"median": 0.33520194418000004,
"user": 0.32642512,
"system": 0.8080657600000001,
"min": 0.29089564068,
"max": 0.40145275068,
"times": [
0.31081881868,
0.36042063168000005,
0.29089564068,
0.31898115568,
0.40145275068,
0.32715519368,
0.37597060768,
0.33563558068000005,
0.33476830768000004,
0.33879206168000003
]
},
{
"command": "pnpr@main",
"mean": 0.3454683795800001,
"stddev": 0.03453353678120744,
"median": 0.34568069168000004,
"user": 0.33582112,
"system": 0.82939206,
"min": 0.30155209168,
"max": 0.40984848668,
"times": [
0.34065866668,
0.36447976468000004,
0.40984848668,
0.35185580668000005,
0.38571489168,
0.35070271668,
0.31496165768,
0.31086214968000003,
0.30155209168,
0.32404756368000004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.5761424595,
"stddev": 0.2174410402561454,
"median": 3.5672075617,
"user": 3.3307162200000002,
"system": 2.4821872799999998,
"min": 3.1641682837,
"max": 3.8821106687,
"times": [
3.6014999787,
3.6692372597,
3.5329151447,
3.8821106687,
3.8447510567000003,
3.7245212467,
3.4609481107,
3.1641682837,
3.4991496177,
3.3821232277
]
},
{
"command": "pacquet@main",
"mean": 3.3547822591,
"stddev": 0.25379681165243595,
"median": 3.4180510092,
"user": 3.02142402,
"system": 2.12245598,
"min": 2.9852103677,
"max": 3.6857518527,
"times": [
3.6028538377,
3.5244904707000004,
3.5108843437000004,
3.6857518527,
3.3252176747,
3.1405788797,
3.5585922877000002,
3.1700318867000004,
2.9852103677,
3.0442109897000003
]
},
{
"command": "pnpr@HEAD",
"mean": 1.61108569,
"stddev": 0.14680026665629411,
"median": 1.5331235032,
"user": 1.48003762,
"system": 1.5525628800000002,
"min": 1.4768939627,
"max": 1.8777370857,
"times": [
1.5415773437,
1.5246696626999998,
1.4984211287,
1.7027507917,
1.4768939627,
1.8777370857,
1.5155891887,
1.4966116827,
1.6465011687,
1.8301048847
]
},
{
"command": "pnpr@main",
"mean": 1.7295313472,
"stddev": 0.1760855304484504,
"median": 1.6861709362,
"user": 1.44877992,
"system": 1.57483658,
"min": 1.5295338707,
"max": 1.9910205987,
"times": [
1.9406883567,
1.9910205987,
1.8625681616999998,
1.6504734547,
1.5295338707,
1.7218684176999999,
1.5439220466999999,
1.6418068297,
1.8783214677,
1.5351102677
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7871985481400002,
"stddev": 0.06755501427876118,
"median": 0.7731400076400001,
"user": 1.0067805,
"system": 0.81467022,
"min": 0.6920427641400001,
"max": 0.8866542481400002,
"times": [
0.8557903041400001,
0.77200803114,
0.8657560961400002,
0.8866542481400002,
0.7487937191400001,
0.7142241601400001,
0.7742719841400001,
0.7366044531400001,
0.6920427641400001,
0.8258397211400001
]
},
{
"command": "pacquet@main",
"mean": 0.7405529188400001,
"stddev": 0.05146090213377472,
"median": 0.7255451831400002,
"user": 0.9472737999999999,
"system": 0.7963723199999999,
"min": 0.6814668441400001,
"max": 0.8189769311400001,
"times": [
0.6820467861400001,
0.6814668441400001,
0.7038266771400001,
0.7247497251400001,
0.8189769311400001,
0.8107209591400001,
0.8006957881400001,
0.7263406411400001,
0.7364330401400001,
0.7202717961400001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.30205921624000004,
"stddev": 0.022613134090306894,
"median": 0.29904130614,
"user": 0.2561191,
"system": 0.6159135199999999,
"min": 0.26084816114000003,
"max": 0.34423525114000003,
"times": [
0.30838273814,
0.30135772214,
0.31869212614000003,
0.29589930714,
0.28745135314000003,
0.34423525114000003,
0.26084816114000003,
0.29672489014000003,
0.28731481714,
0.31968579614000003
]
},
{
"command": "pnpr@main",
"mean": 0.30193138074000003,
"stddev": 0.022628376630624523,
"median": 0.29731308864,
"user": 0.24863739999999995,
"system": 0.59724082,
"min": 0.26488707514,
"max": 0.34315985714,
"times": [
0.28621565714,
0.29027112214,
0.29384947814,
0.29560427114,
0.26488707514,
0.33355345214000004,
0.30660703514,
0.34315985714,
0.29902190614,
0.30614395314000004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.05769679226,
"stddev": 0.06298895763767212,
"median": 2.0522211270599997,
"user": 1.28276414,
"system": 0.8891959799999999,
"min": 1.9785044870600001,
"max": 2.18213029106,
"times": [
1.98690155506,
1.9785044870600001,
2.18213029106,
2.0885583090599997,
2.08360670706,
2.0406817180599996,
2.0139607260599997,
2.0204262160599997,
2.0637605360599998,
2.11843737706
]
},
{
"command": "pacquet@main",
"mean": 2.09351790256,
"stddev": 0.037396466598150824,
"median": 2.09021124156,
"user": 1.3491859400000001,
"system": 0.9315139800000001,
"min": 2.02675618306,
"max": 2.15373195006,
"times": [
2.1164806230599997,
2.15373195006,
2.09553666506,
2.14054883306,
2.02675618306,
2.08488581806,
2.06849149906,
2.10117394106,
2.06324523306,
2.08432828006
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29409743116,
"stddev": 0.022629678136627723,
"median": 0.28794549055999996,
"user": 0.23413053999999994,
"system": 0.60841378,
"min": 0.26208409905999996,
"max": 0.32333249406,
"times": [
0.28634564906,
0.27969809506,
0.27628341706,
0.27258842106,
0.26208409905999996,
0.28954533206,
0.32106323306,
0.30959201906,
0.32333249406,
0.32044155205999997
]
},
{
"command": "pnpr@main",
"mean": 0.27543655735999995,
"stddev": 0.020885467293167273,
"median": 0.26896930456,
"user": 0.22606823999999998,
"system": 0.56324978,
"min": 0.25589812406,
"max": 0.32642952506,
"times": [
0.25888930406,
0.26310291605999997,
0.25589812406,
0.27120866505999996,
0.26672994406,
0.26398475606,
0.27998502506,
0.27621619006,
0.32642952506,
0.29192112406
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.40726164994,
"stddev": 0.026158491978385635,
"median": 0.40663544834,
"user": 0.39411253999999996,
"system": 0.07161384,
"min": 0.37236422034,
"max": 0.47020781434000003,
"times": [
0.39371618534,
0.41169472734,
0.40372767934000003,
0.37236422034,
0.38877329034,
0.39096724034,
0.41722734334,
0.40954321734,
0.47020781434000003,
0.41439478134
]
},
{
"command": "pacquet@main",
"mean": 0.39872075154,
"stddev": 0.014386583095386245,
"median": 0.39989699484,
"user": 0.38923783999999995,
"system": 0.06744634000000001,
"min": 0.37826800434,
"max": 0.41969198234,
"times": [
0.38644194134,
0.39299255234,
0.39409862434000004,
0.37826800434,
0.41376779034,
0.40664757834000004,
0.40569536534,
0.38012018134000003,
0.41969198234,
0.40948349534
]
},
{
"command": "pnpr@HEAD",
"mean": 0.0851629686929412,
"stddev": 0.004495823871614062,
"median": 0.08451821034000001,
"user": 0.01846738705882353,
"system": 0.010589361176470588,
"min": 0.08034815034000001,
"max": 0.10314136634000001,
"times": [
0.08145641634,
0.08702035034000001,
0.08077906134,
0.08164726534000001,
0.08768280634,
0.08876753834000001,
0.09362728734,
0.10314136634000001,
0.08526893234,
0.08426939134,
0.08120815934,
0.08106030134,
0.08045471134,
0.08414036934,
0.08113600334,
0.08490989734,
0.08752266634,
0.08203268134000001,
0.08548468934,
0.08034815034000001,
0.08379167234,
0.08490563934,
0.08856418634,
0.08472514034,
0.08699130534,
0.08666778634000001,
0.08247882034000001,
0.09073020334000001,
0.08266539134,
0.08630735834,
0.08095429134,
0.08737707234,
0.08431128034,
0.08311274334
]
},
{
"command": "pnpr@main",
"mean": 0.08820536227939392,
"stddev": 0.0040377048033266695,
"median": 0.08687151034,
"user": 0.016529967272727267,
"system": 0.014213282424242425,
"min": 0.08317217634,
"max": 0.10127155734000001,
"times": [
0.08351831834000001,
0.08764910434,
0.08317217634,
0.08795228434,
0.08645214034000001,
0.08502321034,
0.08615876834000001,
0.08664544434,
0.08766696734,
0.08484562634000001,
0.08781271134,
0.08431581934,
0.08687151034,
0.08653630934,
0.09285040534000001,
0.09764412834000001,
0.09605244134,
0.09251647634,
0.10127155734000001,
0.08936709734,
0.08658652334,
0.08580215634,
0.08621808934,
0.08826490334,
0.08912161534,
0.08992026934000001,
0.08881587034,
0.09169486934,
0.08619760134,
0.08496510034,
0.08797377434,
0.08461307834000001,
0.08628060734000001
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.819851035779999,
"stddev": 0.14757234557735865,
"median": 4.8191938710799995,
"user": 2.83028312,
"system": 2.0021875799999997,
"min": 4.63432030358,
"max": 5.02970813458,
"times": [
4.96228863258,
4.63432030358,
4.63647076158,
4.97931359058,
5.02970813458,
4.70967668658,
4.69176573058,
4.916578775580001,
4.83124102358,
4.80714671858
]
},
{
"command": "pacquet@main",
"mean": 4.9216558162799995,
"stddev": 0.16231389588542122,
"median": 4.94029617508,
"user": 2.8148765199999994,
"system": 1.9843954799999999,
"min": 4.628097464580001,
"max": 5.16005960058,
"times": [
5.16005960058,
4.882725246580001,
4.97161676958,
4.99319195158,
4.628097464580001,
4.73185102358,
5.06049653958,
4.90897558058,
4.8196669425800005,
5.05987704358
]
},
{
"command": "pnpr@HEAD",
"mean": 3.64976452318,
"stddev": 0.09484971780709955,
"median": 3.62800359458,
"user": 1.6791843200000003,
"system": 1.6772057800000002,
"min": 3.55574828258,
"max": 3.86474480058,
"times": [
3.64468071358,
3.6714813735800003,
3.6113264755800003,
3.7006336005800002,
3.55574828258,
3.86474480058,
3.56086261158,
3.56671091958,
3.71688950258,
3.60456695158
]
},
{
"command": "pnpr@main",
"mean": 3.59334787448,
"stddev": 0.11851149822624248,
"median": 3.54995784158,
"user": 1.6036620199999998,
"system": 1.5462746800000002,
"min": 3.48931242358,
"max": 3.91208536258,
"times": [
3.54532127458,
3.54284329058,
3.54419725058,
3.56961733858,
3.61681703658,
3.48931242358,
3.91208536258,
3.62239655858,
3.55459440858,
3.53629380058
]
}
]
} |
|
| Branch | pr/13064 |
| Testbed | pnpr |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,611.09 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 294.10 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 302.06 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 85.16 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,751.62 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,649.76 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 339.49 ms |
|
Code review by qodo was updated up to the latest commit c4ce4f3 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
|
Code review by qodo was updated up to the latest commit 08146d2 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/release.yml (1)
364-369: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick winNormalize line endings before performing exact string comparisons.
GitHub's API normalizes Markdown text fields and will return the draft release
bodywith CRLF (\r\n) line breaks. Because the locally generatedRELEASE.mdon the macOS runner uses LF (\n), the strict equality check will almost certainly fail, aborting the workflow and blocking publication. Normalize the line endings to ensure a robust, platform-agnostic comparison.🛠️ Proposed fix to normalize the strings before comparing
RELEASE_JSON="$release_json" node <<'NODE' const fs = require('node:fs') - const actual = JSON.parse(fs.readFileSync(process.env.RELEASE_JSON, 'utf8')).body - const expected = fs.readFileSync('RELEASE.md', 'utf8') - if (actual !== expected) throw new Error('GitHub draft release body does not match RELEASE.md') + const normalize = (s) => (s || '').replace(/\r\n/g, '\n').trim() + const actual = normalize(JSON.parse(fs.readFileSync(process.env.RELEASE_JSON, 'utf8')).body) + const expected = normalize(fs.readFileSync('RELEASE.md', 'utf8')) + if (actual !== expected) throw new Error('GitHub draft release body does not match RELEASE.md') NODE🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/release.yml around lines 364 - 369, Normalize line endings in both the parsed GitHub release body and locally read RELEASE.md before the strict comparison in the RELEASE_JSON validation script. Convert CRLF and any other newline variants to LF, then preserve the existing mismatch error behavior when the normalized strings differ.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pnpm11/__utils__/get-release-text/src/main.ts`:
- Around line 30-32: Replace the plain Error throws in get-release-text’s
missing changelog validation at pnpm11/__utils__/get-release-text/src/main.ts
lines 30-32 and missing changelog entry validation at lines 85-87 with PnpmError
using codes MISSING_CHANGELOG and MISSING_CHANGELOG_ENTRY respectively; import
PnpmError from `@pnpm/error` and add `@pnpm/error` to the package dependencies.
---
Outside diff comments:
In @.github/workflows/release.yml:
- Around line 364-369: Normalize line endings in both the parsed GitHub release
body and locally read RELEASE.md before the strict comparison in the
RELEASE_JSON validation script. Convert CRLF and any other newline variants to
LF, then preserve the existing mismatch error behavior when the normalized
strings differ.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 73e91c0d-3e73-4ec6-8d45-715546790679
📒 Files selected for processing (3)
.github/workflows/release.ymlpnpm11/__utils__/get-release-text/src/main.tspnpm11/__utils__/get-release-text/test/main.ts
|
Addressed the outside-diff newline portability finding in Written by an agent (Codex, GPT-5). |
|
Code review by qodo was updated up to the latest commit baed9bc |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
Summary
RELEASE.md, then publish it with a body-preserving API update.Squash Commit Body
Checklist
Written by an agent (Codex, GPT-5).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit