-
Notifications
You must be signed in to change notification settings - Fork 5
fix: update check + add /log-issue-aidevops command #248
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 script was hardcoded to look for VERSION at ~/Git/aidevops/VERSION, which only exists for developers with a local clone. Users who installed via npm or Homebrew never had this file, so they always got 'unknown' and never saw update notifications. Now checks ~/.aidevops/VERSION first (where setup.sh deploys it), with fallback to the dev repo path for contributors.
Adds a slash command that helps users report issues with aidevops: - Gathers diagnostic info (version, OS, AI assistant, install method) - Checks for duplicate issues before creating - Composes well-structured GitHub issues - Creates issue on marcusquinn/aidevops with appropriate labels Includes helper script (log-issue-helper.sh) for: - diagnostics: gather system/aidevops info - check-auth: verify gh CLI authentication - search: find potential duplicate issues
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 enhances the user experience by resolving a critical bug in the update check functionality, which previously prevented non-developer installations from receiving updates. Additionally, it introduces a powerful new command that significantly streamlines the issue reporting workflow, making it easier for users to provide comprehensive diagnostic details and for maintainers to receive actionable bug reports. 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
|
WalkthroughAdds an interactive GitHub issue logging workflow and a diagnostics helper script; updates agent version lookup to check three prioritized VERSION sources (agents, legacy, dev) in order and fall back to "unknown"; bumps package/metadata version strings to 2.92.1. Changes
Sequence DiagramsequenceDiagram
actor User
participant Helper as log-issue-helper.sh
participant Updater as aidevops-update-check.sh
participant GH as GitHub CLI
participant API as GitHub API
User->>Helper: run diagnostics / start log-issue
Helper->>Updater: call get_aidevops_version (checks VERSION_FILE_AGENTS -> LEGACY -> DEV)
Updater-->>Helper: returns local version or "unknown"
Helper->>Helper: gather OS, shell, install method, AI assistant, git context
Helper->>GH: check auth / search issues
GH->>API: query repo issues
API-->>GH: return matching issues
GH-->>Helper: formatted results
Helper-->>User: display diagnostics & duplicates
User->>Helper: confirm compose & submit
Helper->>GH: gh issue create (body + labels)
GH->>API: create issue
API-->>GH: issue created (URL)
GH-->>Helper: success response
Helper-->>User: show issue URL
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
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 fixes the update check for non-developer installations and adds a very useful /log-issue-aidevops command for streamlined issue reporting. The changes are well-implemented. I've identified a couple of minor areas for improvement in the new helper script to enhance maintainability and fix a small bug in the diagnostic gathering logic. Overall, great work on improving the user experience.
| get_aidevops_version() { | ||
| local version_file="$HOME/.aidevops/VERSION" | ||
| local fallback="$HOME/Git/aidevops/VERSION" | ||
|
|
||
| if [[ -f "$version_file" ]]; then | ||
| cat "$version_file" | ||
| elif [[ -f "$fallback" ]]; then | ||
| cat "$fallback" | ||
| else | ||
| echo "unknown" | ||
| 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.
This function is nearly identical to get_version in .agent/scripts/aidevops-update-check.sh. This code duplication could lead to maintenance issues if the version-finding logic needs to be changed in the future.
To improve maintainability, consider extracting this function into a shared script (e.g., .agent/scripts/lib/version.sh) and then sourceing it in both this script and aidevops-update-check.sh.
.agent/scripts/log-issue-helper.sh
Outdated
| if [[ -f /etc/os-release ]]; then | ||
| os_info=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2) | ||
| else | ||
| os_info="Linux $(uname -r)" | ||
| 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.
There's a potential bug in the Linux OS detection. If the /etc/os-release file exists but does not contain a PRETTY_NAME line, the os_info variable will be empty, and the fallback to uname -r will not be triggered. This would leave the OS information blank in the diagnostic report.
You can make this logic more robust and concise.
| if [[ -f /etc/os-release ]]; then | |
| os_info=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2) | |
| else | |
| os_info="Linux $(uname -r)" | |
| fi | |
| if [[ -f /etc/os-release ]]; then | |
| os_info=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2) | |
| fi | |
| : "${os_info:=Linux $(uname -r)}" |
🔍 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 28 22:45:37 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
The v2.92.1 release updated VERSION but missed syncing: - package.json - sonar-project.properties - setup.sh - aidevops.sh - .claude-plugin/marketplace.json
🤖 Augment PR SummarySummary: This PR fixes aidevops’ session update/version check for non-developer installs and adds a new user-facing issue-reporting slash command. Changes:
Technical Notes: Diagnostics are formatted as Markdown for easy inclusion in issue bodies; the flow encourages duplicate checks before creating a new issue. 🤖 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.
| VERSION_FILE="$INSTALL_DIR/VERSION" | ||
| # VERSION file location - check deployed agents directory first (works for all install methods) | ||
| # Fallback to source repo for developers working in ~/Git/aidevops | ||
| VERSION_FILE="$HOME/.aidevops/VERSION" |
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.
| - AI assistant being used | ||
| - OS and shell info | ||
| - Current repo context | ||
| - Recent error logs (if any) |
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.
.agent/scripts/log-issue-helper.sh
Outdated
| # ----------------------------------------------------------------------------- | ||
|
|
||
| get_aidevops_version() { | ||
| local version_file="$HOME/.aidevops/VERSION" |
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.
.agent/scripts/log-issue-helper.sh
Outdated
|
|
||
| get_git_context() { | ||
| local repo branch | ||
| repo=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "none") |
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.
.agent/scripts/log-issue-helper.sh
Outdated
| os_info="macOS $(sw_vers -productVersion 2>/dev/null || echo 'unknown')" | ||
| elif [[ "$(uname)" == "Linux" ]]; then | ||
| if [[ -f /etc/os-release ]]; then | ||
| os_info=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2) |
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 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 28 22:49:03 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
- Check ~/.aidevops/agents/VERSION first (where setup.sh deploys) - Add legacy ~/.aidevops/VERSION as fallback - Fix Linux OS detection to handle missing PRETTY_NAME - Fix git context to handle non-repo directories cleanly - Remove 'Recent error logs' claim from docs (not implemented)
🔍 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 28 22:53: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.
Actionable comments posted: 5
🤖 Fix all issues with AI agents
In @.agent/scripts/aidevops-update-check.sh:
- Around line 9-20: The get_version function can fail under set -e if a VERSION
file exists but isn't readable because cat will exit non‑zero; update the logic
to test readability (use [[ -r "$VERSION_FILE" ]] and [[ -r
"$VERSION_FILE_FALLBACK" ]] ) before attempting to cat, and fall back to echo
"unknown" if the file is missing or not readable; ensure you reference
VERSION_FILE and VERSION_FILE_FALLBACK and keep the same output behavior but
avoid invoking cat on unreadable files so the script doesn't abort.
In @.agent/scripts/commands/log-issue-aidevops.md:
- Around line 1-203: The doc .agent/scripts/commands/log-issue-aidevops.md
currently inlines a full workflow and command snippets instead of pointing to
canonical sources; convert it into a pointer-style stub that references
AGENTS.md for end-user workflow and privacy guidance and points to the
implementation in .agent/scripts/log-issue-helper.sh (include a file:line
reference to the helper's diagnostics subcommand range) instead of duplicating
commands; also remove or correct the "recent error logs" bullet—either delete
that claim from the diagnostics list or implement log collection in the helper
script (log-issue-helper.sh diagnostics) and update the doc to accurately
reflect what is gathered.
In @.agent/scripts/log-issue-helper.sh:
- Around line 94-136: The Linux OS parsing can fail under set -euo pipefail if
PRETTY_NAME is missing; in gather_diagnostics, change the /etc/os-release branch
to safely read PRETTY_NAME into os_info without letting grep/cut pipelines cause
a hard exit: e.g., capture the grep output with redirection and || true (or use
awk/while-read to extract PRETTY_NAME), then test if the captured value is
non-empty and only then set os_info, otherwise fall back to the existing "Linux
$(uname -r)" default; update the os_info assignment that references PRETTY_NAME
so it never runs a failing pipe that can abort the script.
- Around line 14-25: The get_aidevops_version function may call cat on files
that exist but are not readable, which can cause the script to exit under set
-e; update the checks to verify readability (e.g., use [[ -r "$version_file" ]]
and [[ -r "$fallback" ]]) before calling cat or otherwise guard the cat calls
(e.g., if file exists but is not readable, fall back or echo "unknown") so the
function never invokes cat on an unreadable file and never triggers an
unintended hard exit; update references inside get_aidevops_version accordingly.
- Around line 142-167: The search_issues function calls gh directly without
verifying CLI presence or auth; modify search_issues to call check_gh_auth at
its start and return non-zero if check_gh_auth fails so you get consistent,
actionable error messages instead of a terse set -euo failure; keep the rest of
search_issues (the gh issue list invocation and output formatting) unchanged and
only gate it on successful check_gh_auth.
Addresses CodeRabbit review feedback: - Use [[ -r file ]] instead of [[ -f file ]] before cat to avoid failures under set -e when file exists but isn't readable - Add check_gh_auth call at start of search_issues for consistent error messages instead of cryptic set -euo failures
|
🔍 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 28 23:43:09 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
@coderabbitai review All feedback has been addressed:
Please re-review. |
|
I'll now conduct a comprehensive re-review of all the changes in this PR. 🧠 Learnings used✅ Actions performedReview triggered.
|
|
@coderabbitai approve All your requested changes have been implemented. Please submit an approval review. |
|
I can confirm you've implemented all the requested improvements:
The code quality is solid, and the new 🧠 Learnings usedIf you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! ✅ Actions performedComments resolved and changes approved. |



Summary
/log-issue-aidevopscommand for user issue reportingChanges
Bug Fix: Update Check Path
The
aidevops-update-check.shscript was hardcoded to look for VERSION at~/Git/aidevops/VERSION, which only exists for developers with a local clone. Users who installed via npm or Homebrew never had this file, so they always got "unknown" and never saw update notifications.Fix: Now checks
~/.aidevops/VERSIONfirst (wheresetup.shdeploys it), with fallback to the dev repo path for contributors.New Feature: /log-issue-aidevops
Adds a slash command that helps users report issues with aidevops:
marcusquinn/aidevopswith appropriate labelsUsage:
/log-issue-aidevops /log-issue-aidevops "Update check not working"Testing
Summary by CodeRabbit
New Features
Documentation
Improvements
Chores
✏️ Tip: You can customize this high-level summary in your review settings.