You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ Approved with suggestions — low-severity items only, safe to merge
What was reviewed
File
Change
automation/utils/bin/rui-prepare-release.ts
Adds ensureMainBranch() call before Jira init
automation/utils/src/prepare-release-helpers.ts
Adds ensureMainBranch(), printUnreleasedChangelog(), and box-drawing helpers
Skipped (out of scope): dist/, pnpm-lock.yaml
CI checks could not be fetched automatically (permission prompt in this environment); verify they are green before merging.
Findings
⚠️ Low — git checkout main with piped stdio swallows git's error message
File:automation/utils/src/prepare-release-helpers.ts line 155 Problem:{ stdio: "pipe" } silences git's output. If the working tree is dirty when switchToMain() runs, git prints a helpful "error: Your local changes would be overwritten by checkout" to stderr — but with piped stdio that message is swallowed and the outer catch in main() will show only a raw exception, leaving the user to guess what happened. Fix: Either use stdio: "inherit" for this one call so git can speak for itself, or proactively check for a dirty tree before attempting checkout:
const{stdout: status}=awaitexec("git status --porcelain",{stdio: "pipe"});if(status.trim()){console.log(chalk.red("❌ Working tree has uncommitted changes. Stash or commit before switching."));process.exit(1);}awaitexec("git checkout main",{stdio: "inherit"});
⚠️ Low — content[0] accessed without a guard
File:automation/utils/src/prepare-release-helpers.ts line 302 Problem:printUnreleasedChangelog always accesses changelog.changelog.content[0] without checking that content is non-empty. The call sites guard with hasUnreleasedLogs(), but the implicit assumption that content[0] is the unreleased entry is fragile — if the contract ever diverges (empty file, unexpected structure), this silently throws. Fix: Add a defensive early return:
⚠️ Low — padEnd in box renderer uses raw string length, not visible length
File:automation/utils/src/prepare-release-helpers.ts line 292 Problem:wrappedLine.padEnd(contentWidth) measures the raw string length. Today changelog entries are plain text so this is fine, but visibleLen is already defined in this file — using it here would make printSectionBox robust to any future ANSI-coloured log entries without silent misalignment. Note: Not blocking; changelog entries are plain text today. Fix:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main