-
Notifications
You must be signed in to change notification settings - Fork 21
Add script that generates release notes and info #522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Claude finished @jhaaaa's task —— View job Code Review Complete ✅I've reviewed the release notes generation script. This is a well-structured bash utility with embedded Node.js for AI generation. Here's my detailed feedback: 🟢 Strengths1. Security-Conscious Design
2. Robust Error Handling
3. Good User Experience
🟡 Issues to Address (Based on Macroscope Comments)Critical Issues: 1. Portability: BSD vs GNU
2. Tag Input Handling (gen-rn/gen-rn.sh:131)
3. Tag Validation Too Permissive (gen-rn/gen-rn.sh:61) 4. Response Validation (gen-rn/gen-rn.sh:453-457) 5. Multiple Root Commits (gen-rn/gen-rn.sh:226) Medium Priority Issues: 6. 7. Node Version Validation (gen-rn/gen-rn.sh:87) 8. grep Pattern Matching (gen-rn/gen-rn.sh:308) 9. Empty Tag List Handling (gen-rn/gen-rn.sh:120) 🔍 Additional ObservationsCode Quality:
Android/Kotlin Specific:
Performance:
Security:
📝 RecommendationsHigh Priority:
Nice to Have: 🎯 SummaryThis is a well-implemented utility script that shows strong attention to security and error handling. The author has already addressed many of the issues identified by Macroscope's automated review. The main remaining concern is ensuring the script works in non-interactive environments (CI/CD), which is a common use case for release automation. Overall Assessment: ✅ Approve with minor suggestions The script is production-ready for manual use. For automated CI/CD usage, add the non-TTY check mentioned above. Todo List
|
57b74a2 to
e8d3993
Compare
| # Try to find previous tag in same series first (portable approach without grep -B) | ||
| PREVIOUS_TAG=$(git tag --sort=version:refname | grep "^${VERSION_SERIES}\." | { | ||
| local prev="" | ||
| while IFS= read -r tag; do | ||
| if [ "$tag" = "$TAG_NAME" ]; then | ||
| echo "$prev" | ||
| break | ||
| fi | ||
| prev="$tag" | ||
| done | ||
| }) | ||
|
|
||
| # If no same-series tag found, try broader search | ||
| if [ -z "$PREVIOUS_TAG" ]; then | ||
| MAJOR_VERSION=$(echo "$TAG_NAME" | cut -d. -f1) # e.g., "4" from "4.6.4" | ||
| PREVIOUS_TAG=$(git tag --sort=version:refname | grep "^${MAJOR_VERSION}\." | { | ||
| local prev="" | ||
| while IFS= read -r tag; do | ||
| if [ "$tag" = "$TAG_NAME" ]; then | ||
| echo "$prev" | ||
| break | ||
| fi | ||
| prev="$tag" | ||
| done | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using bash local outside a function (lines 193 and 207) will fail (local: can only be used in a function). Consider removing local here—the subshell already scopes prev.
- local prev=""
+ prev=""
- local prev=""
+ prev=""🚀 Reply to ask Macroscope to explain or update this suggestion.
👍 Helpful? React to give us feedback.
Add CLI script to generate XMTP SDK release notes with AI-backed notes creation and release info collection in gen-rn/gen-rn.sh
Introduce
gen-rnCLI that validates prerequisites, detects tags and release type, aggregates git data, and calls Anthropic Messages API to writeoutput/release-notes.md; includes utilities for colored output and a README in gen-rn/README.md.📍Where to Start
Start at the
mainentrypoint in gen-rn/gen-rn.sh, then reviewcheck_prerequisites,setup_environment,gather_release_info, andgenerate_ai_release_notesin order.📊 Macroscope summarized a2f5dbf. 1 file reviewed, 3 issues evaluated, 2 issues filtered, 1 comment posted
🗂️ Filtered Issues
gen-rn/gen-rn.sh — 1 comment posted, 3 evaluated, 2 filtered
node --versiontypically returnsvX.Y.Z, if it returns something likev18.17.0-nightlyor other variants, thecutcommands will still extract18, but the subsequent numeric comparison on line 87 will fail ifNODE_VERSIONis not purely numeric, as the regex check^[0-9]+$would fail and short-circuit to false. [ Already posted ]PREVIOUS_TAGassignment. When commands are piped together, the right side runs in a subshell, so any variable assignments (likeecho "$prev") are captured but the subshell's variables don't propagate back. While command substitution$()is used to capture the output, if thewhileloop never encounters$TAG_NAMEin the list (e.g., tag not in grep results),prevwill be empty and nothing is echoed, makingPREVIOUS_TAGempty even when valid candidates exist. [ Already posted ]