-
Notifications
You must be signed in to change notification settings - Fork 5
fix: handle dynamic GitHub release badge in version-manager.sh #134
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
Conversation
The README.md now uses a dynamic GitHub release badge instead of a hardcoded version badge. The version-manager.sh was still trying to update the hardcoded badge and failing when it wasn't found, which caused it to return early before updating marketplace.json. Changes: - Check for dynamic badge (img.shields.io/github/v/release) first - Skip README update if dynamic badge is used (GitHub handles it) - Only update hardcoded badge if present - Warn if no version badge found (non-fatal) This fixes the issue where marketplace.json wasn't being updated during releases because the README validation failed first.
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical flaw in the release process where the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
WalkthroughThe version manager script now implements conditional README badge handling that detects dynamic GitHub release badges and skips updates, while validating updates to hardcoded version badges with enhanced error handling. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Wed Jan 21 02:14:28 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
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.
Code Review
This pull request effectively resolves a bug in the version-manager.sh script that caused release failures when a hardcoded version badge was not found in the README. The new logic correctly handles the dynamic GitHub release badge, provides a fallback for the old hardcoded badge, and gracefully warns instead of erroring if no badge is present. This makes the release process more robust. I've added one suggestion to improve maintainability by using variables for the badge patterns.
| if grep -q "img.shields.io/github/v/release" "$REPO_ROOT/README.md"; then | ||
| # Dynamic badge - no update needed, GitHub handles it automatically | ||
| print_success "README.md uses dynamic GitHub release badge (no update needed)" | ||
| elif grep -q "Version-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*-blue" "$REPO_ROOT/README.md"; then | ||
| # Hardcoded badge - update it | ||
| sed -i '' "s/Version-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*-blue/Version-$new_version-blue/" "$REPO_ROOT/README.md" | ||
|
|
||
| # Validate the update was successful | ||
| if grep -q "Version-$new_version-blue" "$REPO_ROOT/README.md"; then | ||
| print_success "Updated README.md version badge to $new_version" | ||
| else | ||
| print_error "Failed to update README.md version badge" | ||
| print_info "Please manually update the version badge in README.md" | ||
| return 1 | ||
| fi | ||
| else | ||
| print_error "Failed to update README.md version badge" | ||
| print_info "Please manually update the version badge in README.md" | ||
| return 1 | ||
| # No version badge found - that's okay, just warn | ||
| print_warning "README.md has no version badge (consider adding dynamic GitHub release badge)" | ||
| fi |
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.
To improve maintainability and avoid repeating the badge patterns, consider storing them in local variables. This makes the code easier to read and update in the future if the patterns change.
local dynamic_badge_pattern="img.shields.io/github/v/release"
local hardcoded_badge_pattern="Version-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*-blue"
if grep -q "$dynamic_badge_pattern" "$REPO_ROOT/README.md"; then
# Dynamic badge - no update needed, GitHub handles it automatically
print_success "README.md uses dynamic GitHub release badge (no update needed)"
elif grep -q "$hardcoded_badge_pattern" "$REPO_ROOT/README.md"; then
# Hardcoded badge - update it
sed -i '' "s/$hardcoded_badge_pattern/Version-$new_version-blue/" "$REPO_ROOT/README.md"
# Validate the update was successful
if grep -q "Version-$new_version-blue" "$REPO_ROOT/README.md"; then
print_success "Updated README.md version badge to $new_version"
else
print_error "Failed to update README.md version badge"
print_info "Please manually update the version badge in README.md"
return 1
fi
else
# No version badge found - that's okay, just warn
print_warning "README.md has no version badge (consider adding dynamic GitHub release badge)"
fi
🤖 Augment PR SummarySummary: Updates 🤖 Was this summary useful? React with 👍 or 👎 |
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.
Review completed. No suggestions at this time.
Comment augment review to trigger a new review at any time.
The README.md now uses a dynamic GitHub release badge instead of a hardcoded version badge. The version-manager.sh was still trying to update the hardcoded badge and failing when it wasn't found, which caused it to return early before updating marketplace.json. Changes: - Check for dynamic badge (img.shields.io/github/v/release) first - Skip README update if dynamic badge is used (GitHub handles it) - Only update hardcoded badge if present - Warn if no version badge found (non-fatal) This fixes the issue where marketplace.json wasn't being updated during releases because the README validation failed first.
* docs: improve README maintainability and add AI-CONTEXT block - Remove hardcoded version badge (2.66.0) - use dynamic GitHub release badge - Remove hardcoded lines of code badge - goes stale quickly - Add AI-CONTEXT block with quick reference for AI assistants - Fix Architecture section: remove duplicates, add proper structure - Update MCP badge to 20+ (approximate count) These changes follow maintainability guidelines from workflows/readme-create-update.md * fix: update version validator to accept dynamic GitHub release badge The validator now recognizes the dynamic GitHub release badge (img.shields.io/github/v/release) as the preferred approach over hardcoded version badges that go stale. This aligns with README maintainability guidelines that recommend avoiding hardcoded counts and versions. * fix: use approximate counts in AI-CONTEXT and Architecture sections Address CodeRabbit review feedback: - Change '14 main agents' to '~15 main agents' (approximate) - Change '130+ helper scripts' to '100+ helper scripts' (round number) This ensures counts remain accurate longer without frequent updates. * style: use h3 headings in AI-CONTEXT block for better semantic structure Address Gemini Code Assist feedback: - Change 'Key Commands' from bold to ### heading - Change 'Agent Structure' from bold to ### heading This improves machine readability and semantic consistency. * fix: make remaining agent count approximate Missed one hardcoded '14 domain agents' at line 892. Changed to '~15 domain agents' for consistency. * 🤖 AUTO-FIX: Apply code quality improvements ✅ AUTOMATED FIXES: - Applied Qlty auto-formatting - Fixed common shellcheck issues - Updated code quality standards 🔍 ANALYSIS: - SonarCloud: 323 code smells - Codacy: Analysis completed - Qlty: Auto-formatting applied Generated by: GitHub Actions Code Review Monitoring * feat(plan-plus): add agent design subagents for planning discussions (#132) Add build-agent and agent-review to Plan+ subagents list so users can discuss agent design patterns during planning mode before implementation. * feat: add readme-helper.sh for dynamic count management (#131) * feat: add readme-helper.sh for dynamic count management - New script: readme-helper.sh with commands: - counts: Show current agent/script counts - check: Verify if README counts are stale - update: Update README counts (with --apply flag) - Updated full-loop.md: Added README check step for aidevops repo - Updated readme-create-update.md: Added dynamic counts guidance - Updated readme.md command: Added helper script reference This enables automated README maintenance and prevents count staleness. * fix: address review feedback for readme-helper.sh - Remove unnecessary SC2034 shellcheck disable (Gemini feedback) - Add caching for count functions to avoid repeated find calls (Gemini) - Guard for missing directories, return 0 instead of failing (Augment) - Align rounding logic between check and update commands (Augment) - Both now use round_scripts() and round_subagents() functions - Consistent output: 150+ subagents, 130+ scripts * style: add blank lines before fenced code blocks Fix Codacy markdown linting issues in full-loop.md and readme-create-update.md * 🤖 AUTO-FIX: Apply code quality improvements ✅ AUTOMATED FIXES: - Applied Qlty auto-formatting - Fixed common shellcheck issues - Updated code quality standards 🔍 ANALYSIS: - SonarCloud: 324 code smells - Codacy: Analysis completed - Qlty: Auto-formatting applied Generated by: GitHub Actions Code Review Monitoring * chore(release): bump version to 2.67.0 - feat: add readme-helper.sh for dynamic count management (#131) - feat(plan-plus): add agent design subagents for planning discussions (#132) - docs: improve README maintainability and add AI-CONTEXT block (#130) Also fixes version-manager.sh to accept dynamic GitHub release badges. * 🤖 AUTO-FIX: Apply code quality improvements ✅ AUTOMATED FIXES: - Applied Qlty auto-formatting - Fixed common shellcheck issues - Updated code quality standards 🔍 ANALYSIS: - SonarCloud: 328 code smells - Codacy: Analysis completed - Qlty: Auto-formatting applied Generated by: GitHub Actions Code Review Monitoring * fix: consolidate version validation to single source of truth (#133) - Update validate-version-consistency.sh with aidevops.sh, package.json, marketplace.json checks - Refactor version-manager.sh to call standalone validator instead of duplicate logic - Add validation after marketplace.json sed update to catch silent failures - Update auto-version-bump.sh with complete file list Fixes issue where version-manager.sh had its own validation logic that drifted from validate-version-consistency.sh (used by CI), causing release v2.67.0 to fail initially when PR #130 updated only the standalone script. * docs: add changelog entry for version validation fix * chore(release): bump version to 2.67.1 * 🤖 AUTO-FIX: Apply code quality improvements ✅ AUTOMATED FIXES: - Applied Qlty auto-formatting - Fixed common shellcheck issues - Updated code quality standards 🔍 ANALYSIS: - SonarCloud: 328 code smells - Codacy: Analysis completed - Qlty: Auto-formatting applied Generated by: GitHub Actions Code Review Monitoring * fix: handle dynamic GitHub release badge in version-manager.sh (#134) The README.md now uses a dynamic GitHub release badge instead of a hardcoded version badge. The version-manager.sh was still trying to update the hardcoded badge and failing when it wasn't found, which caused it to return early before updating marketplace.json. Changes: - Check for dynamic badge (img.shields.io/github/v/release) first - Skip README update if dynamic badge is used (GitHub handles it) - Only update hardcoded badge if present - Warn if no version badge found (non-fatal) This fixes the issue where marketplace.json wasn't being updated during releases because the README validation failed first. * docs: add changelog entry for dynamic badge fix * chore(release): bump version to 2.67.2 * docs: add /add-skill command to README - Add /add-skill to Meta/Improvement slash commands table - Add 'Importing External Skills' section under Cross-Tool Compatibility - Document supported formats (SKILL.md, AGENTS.md, .cursorrules) - Document features (conflict detection, version tracking, symlinks) * style: add blank line before heading in CHANGELOG (MD022) --------- Co-authored-by: GitHub Action <action@github.com>



Summary
Fixes the issue where
marketplace.jsonwasn't being updated during releases.Problem
After PR #130 changed the README to use a dynamic GitHub release badge instead of a hardcoded version badge, the
version-manager.shscript was:Version-X.Y.Z-blue)return 1) before reaching the marketplace.json updateThis is why during the v2.67.1 release, marketplace.json had to be updated manually.
Solution
Update the README badge handling logic to:
img.shields.io/github/v/releaseis found, skip the update (GitHub handles it automatically)Testing
Files Changed
version-manager.shSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.