[issues/249] Release script renames + QA issue automation#608
Conversation
…A issue generation into lock Rename the three release pnpm scripts for logical grouping and clarity: - `lock-version` → `release:lock` (freeze version for QA) - `finalize-release` → `release:prepare` (prepare docs for publication) - `start-release` → `release:start` (open next dev cycle) `release:lock` now chains `generate-qa-issue.sh` automatically — running one command both locks the version and creates the GitHub QA issue tracker. The issue generator skips its interactive prompt when stdin is not a terminal. Also refactors `generate-qa-issue.sh` to eliminate duplicated content between GitHub and local output modes, and adds a final "Release Ready" checkbox that points to the next step (`release:prepare`). Benefits: - `release:` prefix groups related scripts in pnpm's flat namespace - "prepare" replaces the misleading "finalize" (which isn't the terminal step) - One command to lock + create QA issue instead of two - Local mode reuses GitHub body instead of duplicating it - QA issue includes explicit next-step instruction
… full lock workflow Wraps branch creation, version locking, QA issue generation, and commit message generation into one script. `pnpm release:lock:vscode-extension X.Y.Z` now: 1. Creates a `release/vX.Y.Z` branch from main 2. Runs lock-version.sh (rename YAML, bump .version, regenerate instructions) 3. Runs generate-qa-issue.sh (creates GitHub issue with correct versioned title) 4. Writes a commit message file with the QA issue URL 5. Prints the remaining manual steps (review, commit, push, QA) Benefits: - Predictable branch naming (`release/vX.Y.Z`) - QA issue URL is embedded in the commit message and summary - lock-version.sh stays focused on locking — orchestration lives separately - No more chained `&&` in package.json
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughRename release commands to a namespaced release:lock/prepare/start, add an orchestration script to lock releases and generate QA issues, make QA-issue generation TTY-aware and refactor body assembly, add a smoke-test phase to publishing instructions, and update scripts/tests for git status-based dirty checks. ChangesRelease workflow scheme update
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@packages/rangelink-vscode-extension/scripts/orchestrate-release-lock.sh`:
- Around line 38-41: The current "clean tree" guard uses git -C "$REPO_ROOT"
diff-index --quiet HEAD -- which ignores untracked files; update the guard to
fail when any untracked or uncommitted changes exist by running a
repository-level check that includes untracked files (e.g., run git -C
"$REPO_ROOT" status --porcelain and treat any non-empty output as dirty) in the
same block that references REPO_ROOT so the script exits with the same error
message if the workspace is not truly clean.
- Around line 84-85: The pipeline assigning LAST in orchestrate-release-lock.sh
fails on first run when COMMIT_MSGS_DIR is empty because grep exits non-zero;
update the LAST assignment to tolerate no matches (e.g., change LAST=$(ls
"$COMMIT_MSGS_DIR" | grep -o '^[0-9]\{4\}' | sort -n | tail -1) to include a
fallback such as LAST=$(ls "$COMMIT_MSGS_DIR" | grep -o '^[0-9]\{4\}' || true |
sort -n | tail -1) or use a safe alternative like find/printf that returns empty
without a non-zero exit), leaving NEXT_NUM computation (printf ...
$((10#${LAST:-0} + 1))) unchanged so the first commit file is numbered
correctly.
🪄 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
Run ID: 042233b7-e03f-4511-b7c8-72136b36f879
📒 Files selected for processing (8)
CLAUDE.mddocs/RELEASE-STRATEGY.mdpackage.jsonpackages/rangelink-vscode-extension/TESTING.mdpackages/rangelink-vscode-extension/package.jsonpackages/rangelink-vscode-extension/scripts/generate-publishing-instructions.shpackages/rangelink-vscode-extension/scripts/generate-qa-issue.shpackages/rangelink-vscode-extension/scripts/orchestrate-release-lock.sh
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…e scripts Replace `git diff-index --quiet HEAD --` with `git status --porcelain` in all three release scripts so untracked files also block execution. Add `|| true` to the commit-message numbering pipeline so the script doesn't abort on first run when `.commit-msgs/` is empty. Benefits: - Untracked files no longer slip past the clean-tree guard - First-run commit numbering works without aborting - All three scripts (orchestrate-release-lock, lock-version, finalize-release) now use the same clean-tree check Ref: #608 (review)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@coderabbitai full review - I was rate-limited in #608 (comment) |
|
(ᴖ‿ᴖ)🐇 ✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
packages/rangelink-vscode-extension/scripts/orchestrate-release-lock.sh (1)
84-85:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix
LASTextraction pipeline precedence before arithmetic.Line 84 currently lets
|| trueshort-circuit thesort | tailstage, soLASTcan become multi-line and break Line 85 arithmetic when multiple commit-message files exist.Suggested fix
-LAST=$(ls "$COMMIT_MSGS_DIR" | grep -o '^[0-9]\{4\}' || true | sort -n | tail -1) +LAST=$( + find "$COMMIT_MSGS_DIR" -maxdepth 1 -type f -printf '%f\n' \ + | sed -n 's/^\([0-9]\{4\}\).*/\1/p' \ + | sort -n \ + | tail -1 +) NEXT_NUM=$(printf "%04d" $((10#${LAST:-0} + 1)))Run this to verify the current expression can produce an invalid multi-line
LAST:#!/usr/bin/env bash set -euo pipefail tmp="$(mktemp -d)" mkdir -p "$tmp/.commit-msgs" touch "$tmp/.commit-msgs/0001-a.txt" "$tmp/.commit-msgs/0010-b.txt" set +e out=$(bash -lc ' set -euo pipefail COMMIT_MSGS_DIR="'"$tmp"'/.commit-msgs" LAST=$(ls "$COMMIT_MSGS_DIR" | grep -o '\''^[0-9]\{4\}'\'' || true | sort -n | tail -1) printf "LAST=<%s>\n" "$LAST" NEXT_NUM=$(printf "%04d" $((10#${LAST:-0} + 1))) printf "NEXT_NUM=%s\n" "$NEXT_NUM" ' 2>&1) code=$? set -e printf '%s\n' "$out" echo "exit_code=$code"Expected: non-zero exit and/or malformed
LASToutput with multiple entries.🤖 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 `@packages/rangelink-vscode-extension/scripts/orchestrate-release-lock.sh` around lines 84 - 85, The pipeline that computes LAST lets the "|| true" only apply to grep, which can leave LAST multi-line and break the arithmetic in NEXT_NUM; fix by applying the fallback to the entire pipeline (e.g., wrap the pipeline in a subshell or move "|| true" to the end of the full pipeline) so LAST is a single value or empty, then NEXT_NUM=$(printf "%04d" $((10#${LAST:-0} + 1))) will work reliably.
🤖 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
`@packages/rangelink-vscode-extension/scripts/generate-publishing-instructions.sh`:
- Around line 454-456: Update the smoke-test step that currently instructs to
run the wrong command palette entry "RangeLink: Show Extension Info" to use the
actual registered command title "RangeLink: Show Version Info"; modify the
string in the generate-publishing-instructions.sh instructions block so step 2
runs "RangeLink: Show Version Info" (leave the ${VERSION} check unchanged).
---
Duplicate comments:
In `@packages/rangelink-vscode-extension/scripts/orchestrate-release-lock.sh`:
- Around line 84-85: The pipeline that computes LAST lets the "|| true" only
apply to grep, which can leave LAST multi-line and break the arithmetic in
NEXT_NUM; fix by applying the fallback to the entire pipeline (e.g., wrap the
pipeline in a subshell or move "|| true" to the end of the full pipeline) so
LAST is a single value or empty, then NEXT_NUM=$(printf "%04d" $((10#${LAST:-0}
+ 1))) will work reliably.
🪄 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
Run ID: d1086d4e-cd96-40f2-8bf8-9a7373933297
📒 Files selected for processing (12)
CLAUDE.mddocs/RELEASE-STRATEGY.mdpackage.jsonpackages/rangelink-vscode-extension/TESTING.mdpackages/rangelink-vscode-extension/package.jsonpackages/rangelink-vscode-extension/scripts/finalize-release.shpackages/rangelink-vscode-extension/scripts/generate-publishing-instructions.shpackages/rangelink-vscode-extension/scripts/generate-qa-issue.shpackages/rangelink-vscode-extension/scripts/lock-version.shpackages/rangelink-vscode-extension/scripts/orchestrate-release-lock.shtests/shell/finalize-release.batstests/shell/lock-version.bats
…e scripts Move `|| true` to end of full pipeline in orchestrate-release-lock.sh so sort/tail always execute when commit-msg files exist. Fix "Show Extension Info" → "Show Version Info" in generate-publishing-instructions.sh smoke-test step. Benefits: - Commit message numbering works correctly when multiple files exist - Smoke-test instructions reference the actual registered command title Ref: #608 (review)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The CI workflow only installs bats — no Node.js. Added a node stub so we can support `generate-publishing-instructions.sh` calling node -p "require(...)" to read package.json and version.json.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ns test passes on Ubuntu CI The script validates VSIX existence, CHANGELOG.md, and README.md before generating instructions. CI runners have no Node.js, npx, or project files. Add the missing fixture files and stubs so the test runs without a real toolchain. Ref: #608 (review)
✅ CI / Integration Tests (with extensions) — run summary
|
✅ CI / Test & Validate — run summary
|
Summary
Regroups the three release scripts under a
release:prefix for logical grouping, renames "finalize" to "prepare" to better reflect its role in the lifecycle, and chains QA issue generation intorelease:lockso one command both locks the version and creates the GitHub issue tracker.Changes
lock-version→release:lock,finalize-release→release:prepare,start-release→release:startorchestrate-release-lock.sh— single command for the full lock workflow: createsrelease/vX.Y.Zbranch, runs lock + QA issue generation, writes commit messagegenerate-qa-issue.shskips its interactive prompt when stdin is not a terminalrelease:prepareas the next stepgenerate-qa-issue.shto eliminate duplicated content between GitHub and local output modesTest Plan
pnpm release:lock:vscode-extension <version>creates the QA issue in one stepRelated
2.0.0release #249Summary by CodeRabbit
New Features
Documentation
Chores
Bug Fixes / Tests