Skip to content

fix: deploy greeting template via setup.sh and include app name in greeting#421

Merged
marcusquinn merged 3 commits intomainfrom
bugfix/greeting-template-deploy
Feb 7, 2026
Merged

fix: deploy greeting template via setup.sh and include app name in greeting#421
marcusquinn merged 3 commits intomainfrom
bugfix/greeting-template-deploy

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 7, 2026

Summary

  • Session greeting was missing the app name (e.g., "in OpenCode v1.1.53") because the template instruction was too vague and setup.sh never deployed the managed template
  • Makes greeting parse instruction explicit with named fields ({app}, {app_version}) matching the script output format
  • Adds template deploy step to inject_agents_reference() in setup.sh so ~/.config/opencode/AGENTS.md stays in sync with the repo template on every aidevops update

Before: "We're running https://aidevops.sh v2.105.0."
After: "We're running https://aidevops.sh v2.105.0 in OpenCode v1.1.53."

Resolves t137.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added configuration-level greeting initialization for improved onboarding
    • Restructured welcome message to display version and environment information

…eeting

The session greeting was missing the app name (e.g., 'in OpenCode v1.1.53')
because: 1) the template instruction was too vague ('relay ALL lines'), and
2) setup.sh never deployed the template to ~/.config/opencode/AGENTS.md.

- Make greeting parse instruction explicit with named fields ({app}, {app_version})
- Add template deploy step to inject_agents_reference() in setup.sh
- Resolves t137
@gemini-code-assist
Copy link

Summary of Changes

Hello @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 an issue where the session greeting lacked crucial application details. It introduces changes to ensure the greeting template is properly deployed and parsed, resulting in a more informative welcome message that includes the application's name and version. The update streamlines the process of keeping the greeting template current with the main repository.

Highlights

  • Session Greeting Enhancement: The session greeting was previously missing the application name (e.g., 'in OpenCode v1.1.53') due to vague template instructions and the template not being deployed by setup.sh.
  • Explicit Parsing Instructions: The greeting parsing instructions have been made explicit, now using named fields ({app}, {app_version}) to match the script output format, ensuring correct information extraction.
  • Template Deployment Automation: A template deployment step has been added to the inject_agents_reference() function in setup.sh. This ensures that ~/.config/opencode/AGENTS.md is kept in sync with the repository's managed template upon every aidevops update.
Changelog
  • setup.sh
    • Added a new section within the inject_agents_reference function to deploy the opencode-config-agents.md template to the user's ~/.config/opencode directory, ensuring the greeting template is always up-to-date.
  • templates/opencode-config-agents.md
    • Modified the instruction for parsing the session greeting output to explicitly include {app} and {app_version} fields, allowing for the display of the application name and version in the greeting.
    • Updated the example greeting format to reflect the inclusion of the application name and version.
Activity
  • This is a new pull request.
  • The pull request resolves issue t137.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 7, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 16 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

This PR enhances the OpenCode environment setup by introducing config-level AGENTS.md injection into setup.sh alongside per-OpenCode instances, and refines the greeting template to parse version information from the first line of output in a structured format.

Changes

Cohort / File(s) Summary
Setup Configuration Injection
setup.sh
Added conditional logic to inject_agents_reference that deploys a template-based greeting to ~/.config/opencode/AGENTS.md if the config directory exists and the template is available. Includes success logging without altering existing control flow.
Greeting Template
templates/opencode-config-agents.md
Replaced bulk line relaying with structured first-line parsing (expecting format: `aidevops v{version} running in {app} v{app_version}

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

Config greets with fresh precision, ✨
Setup injects with clean decision,
Version lines now parsed with care,
A DevOps blessing in the air! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: deploying the greeting template via setup.sh and adding the app name to the greeting output.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/greeting-template-deploy

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 25 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Feb 7 04:58:25 UTC 2026: Code review monitoring started
Sat Feb 7 04:58:25 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 25
Sat Feb 7 04:58:25 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sat Feb 7 04:58:27 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 25
  • VULNERABILITIES: 0

Generated on: Sat Feb 7 04:58:30 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 addresses an issue where the session greeting was missing the application name. It does so by deploying a managed template via setup.sh and making the greeting instructions more explicit. The changes are logical and well-implemented. I have one suggestion to improve error handling in setup.sh to make the script more robust.

setup.sh Outdated
Comment on lines 2710 to 2711
cp "$template_source" "$opencode_config_agents"
print_success "Deployed greeting template to $opencode_config_agents"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The cp command's success is not verified. If the copy operation fails (e.g., due to file permissions), the script will incorrectly report success, which could be misleading. It's better to check the exit status of the cp command to provide accurate feedback to the user.

Suggested change
cp "$template_source" "$opencode_config_agents"
print_success "Deployed greeting template to $opencode_config_agents"
if cp "$template_source" "$opencode_config_agents"; then
print_success "Deployed greeting template to $opencode_config_agents"
else
print_error "Failed to deploy greeting template to $opencode_config_agents"
fi

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@setup.sh`:
- Around line 2703-2712: The deployment block uses an undefined SCRIPT_DIR
(uppercase) so template_source is wrong and the copy never runs; fix by either
(A) computing a local script_dir exactly like other functions (e.g., as used in
deploy_aidevops_agents and install_aidevops_cli) and replace TEMPLATE_SOURCE to
reference that lowercase script_dir, or (B) define a global SCRIPT_DIR once near
the top (next to INSTALL_DIR) using the same BASH_SOURCE resolution pattern and
then use that global SCRIPT_DIR in the deployment block to set template_source
and ensure opencode_config_agents is populated and copied.
🧹 Nitpick comments (1)
setup.sh (1)

2709-2710: Consider guarding against accidental overwrite of user customizations.

Every other config-touching path in this script (e.g., deploy_aidevops_agents, update_opencode_config) creates a backup via create_backup_with_rotation before overwriting. This block unconditionally overwrites ~/.config/opencode/AGENTS.md with no backup and no diff check. If a user has customized their config-level AGENTS.md, their changes are silently lost on every aidevops update.

♻️ Add a lightweight guard or backup
     if [[ -d "$opencode_config_dir" && -f "$template_source" ]]; then
+        if [[ -f "$opencode_config_agents" ]]; then
+            # Skip if already identical (avoids unnecessary backup churn)
+            if ! diff -q "$template_source" "$opencode_config_agents" &>/dev/null; then
+                create_backup_with_rotation "$opencode_config_agents" "opencode-agents"
+            fi
+        fi
         cp "$template_source" "$opencode_config_agents"
         print_success "Deployed greeting template to $opencode_config_agents"
     fi

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 25 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Feb 7 05:00:57 UTC 2026: Code review monitoring started
Sat Feb 7 05:00:58 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 25
Sat Feb 7 05:00:58 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sat Feb 7 05:01:00 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 25
  • VULNERABILITIES: 0

Generated on: Sat Feb 7 05:01:03 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

…re overwrite

Address CodeRabbit review feedback:
- SCRIPT_DIR was undefined; use global INSTALL_DIR (set at line 25)
- Add backup with rotation before overwriting user customizations
- Skip backup if template is already identical (avoids churn)
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 25 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Feb 7 05:05:00 UTC 2026: Code review monitoring started
Sat Feb 7 05:05:01 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 25
Sat Feb 7 05:05:01 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sat Feb 7 05:05:03 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 25
  • VULNERABILITIES: 0

Generated on: Sat Feb 7 05:05:06 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 7, 2026

@marcusquinn marcusquinn merged commit fdcbc6e into main Feb 7, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant