docs: canonical workflow templates for Indigo plugins#40
Conversation
Add reference version-check.yml + create-release.yml that auto-detect the plugin bundle via find, so the same files work in any plugin repo without edits. Will roll out to all 11 Indigo plugin repos. Bumps to 1.9.2 (docs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR bumps the Indigo plugin version from 1.9.1 to 1.9.2 across manifest files, and introduces two drop-in GitHub Actions workflows: a PR-time version-check workflow that enforces version uniqueness, and a main/master release-automation workflow that creates plugin bundles and publishes GitHub releases. ChangesPlugin Release Automation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
🧹 Nitpick comments (3)
docs/plugin-dev/workflows/version-check.yml (1)
30-41: ⚡ Quick winConsider using a more robust XML parser.
The
grep | sedapproach to extractPluginVersionis fragile for the same reasons noted increate-release.yml. Since both workflows need to parse the sameInfo.plist, consider usingxmllintwith XPath or Python'splistlibfor consistency and robustness.🔧 Alternative implementations
Option 1: Using xmllint
- name: Extract version from Info.plist id: get_version run: | PLUGIN_NAME="${{ steps.get_plugin_name.outputs.plugin_name }}" - VERSION=$(grep -A1 '<key>PluginVersion</key>' "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist" | grep '<string>' | sed 's/.*<string>\(.*\)<\/string>.*/\1/') + VERSION=$(xmllint --xpath 'string(//key[text()="PluginVersion"]/following-sibling::string[1])' "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist") if [ -z "$VERSION" ]; then echo "Error: Could not extract PluginVersion from Info.plist." >&2 exit 1 fi echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Extracted version: $VERSION"Option 2: Using Python plistlib
- name: Extract version from Info.plist id: get_version run: | PLUGIN_NAME="${{ steps.get_plugin_name.outputs.plugin_name }}" - VERSION=$(grep -A1 '<key>PluginVersion</key>' "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist" | grep '<string>' | sed 's/.*<string>\(.*\)<\/string>.*/\1/') + VERSION=$(python3 -c "import plistlib; print(plistlib.load(open('${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist', 'rb'))['PluginVersion'])") if [ -z "$VERSION" ]; then echo "Error: Could not extract PluginVersion from Info.plist." >&2 exit 1 fi echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Extracted version: $VERSION"🤖 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 `@docs/plugin-dev/workflows/version-check.yml` around lines 30 - 41, Replace the fragile grep|sed parsing in the get_version step (where PLUGIN_NAME and VERSION are used to read "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist") with a robust XML/plist parser; for example, call xmllint with an XPath that selects the PluginVersion string or run a short Python snippet using plistlib to load Info.plist and print the PluginVersion, preserve the existing error check and exit behavior if PluginVersion is missing, and continue to write the result to GITHUB_OUTPUT exactly as "version=$VERSION" so downstream steps receive the same variable.docs/plugin-dev/workflows/README.md (1)
1-31: 💤 Low valueUse capitalized "Plugin" when referring to Indigo Plugins.
The README uses lowercase "plugin" in several places when referring to Indigo Plugins. As per coding guidelines, use "Plugin" (capitalized) to distinguish Indigo Plugins from this project's Claude Code plugin components.
Instances to update:
- Line 1: "Indigo plugins" → "Indigo Plugins"
- Line 3: "Indigo plugin" → "Indigo Plugin"
- Line 13: "plugin bundle" → "Plugin bundle"
- Line 18: "plugin name" → "Plugin name"
As per coding guidelines: Use 'Plugin' (capitalized) when referring to Indigo plugins (the tools this project helps build).
🤖 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 `@docs/plugin-dev/workflows/README.md` around lines 1 - 31, Update all occurrences that refer to Indigo plugins to use the capitalized form "Plugin": change the header "# Canonical CI workflows for Indigo plugins" to "Plugins", change the sentence "Drop-in GitHub Actions workflows for any Indigo plugin in the workspace" to "Indigo Plugin", change "plugin bundle" in the Files/Conventions bullets to "Plugin bundle", and change "plugin name" in Usage to "Plugin name"; ensure mentions of PluginVersion and Info.plist remain unchanged (they identify the plist key), and keep filenames version-check.yml and create-release.yml as-is.docs/plugin-dev/workflows/create-release.yml (1)
32-43: ⚡ Quick winConsider using a more robust XML parser.
The
grep | sedapproach to extractPluginVersionfromInfo.plistis fragile and may break with whitespace changes or formatting variations. Consider usingxmllintwith XPath or Python'splistlibfor more reliable parsing.🔧 Alternative implementation using xmllint
- name: Extract version from Info.plist id: get_version run: | PLUGIN_NAME="${{ steps.get_plugin_name.outputs.plugin_name }}" - VERSION=$(grep -A1 '<key>PluginVersion</key>' "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist" | grep '<string>' | sed 's/.*<string>\(.*\)<\/string>.*/\1/') + VERSION=$(xmllint --xpath 'string(//key[text()="PluginVersion"]/following-sibling::string[1])' "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist") if [ -z "$VERSION" ]; then echo "Error: Could not extract PluginVersion from Info.plist." >&2 exit 1 fi echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Extracted version: $VERSION"Alternatively, using Python's
plistlib(available in standard library):- name: Extract version from Info.plist id: get_version run: | PLUGIN_NAME="${{ steps.get_plugin_name.outputs.plugin_name }}" - VERSION=$(grep -A1 '<key>PluginVersion</key>' "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist" | grep '<string>' | sed 's/.*<string>\(.*\)<\/string>.*/\1/') + VERSION=$(python3 -c "import plistlib; print(plistlib.load(open('${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist', 'rb'))['PluginVersion'])") if [ -z "$VERSION" ]; then echo "Error: Could not extract PluginVersion from Info.plist." >&2 exit 1 fi echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Extracted version: $VERSION"🤖 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 `@docs/plugin-dev/workflows/create-release.yml` around lines 32 - 43, Replace the fragile grep/sed extraction in the GitHub Actions step id get_version with a robust XML/plist parse: call a reliable parser (e.g., xmllint with an XPath or Python's plistlib) to read "${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist" and extract the PluginVersion key, assign it to VERSION, validate non-empty, and then echo "version=$VERSION" >> $GITHUB_OUTPUT; update references to PLUGIN_NAME and VERSION within the get_version step and preserve the existing error/exit behavior if extraction fails.
🤖 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.
Nitpick comments:
In `@docs/plugin-dev/workflows/create-release.yml`:
- Around line 32-43: Replace the fragile grep/sed extraction in the GitHub
Actions step id get_version with a robust XML/plist parse: call a reliable
parser (e.g., xmllint with an XPath or Python's plistlib) to read
"${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist" and extract the PluginVersion
key, assign it to VERSION, validate non-empty, and then echo "version=$VERSION"
>> $GITHUB_OUTPUT; update references to PLUGIN_NAME and VERSION within the
get_version step and preserve the existing error/exit behavior if extraction
fails.
In `@docs/plugin-dev/workflows/README.md`:
- Around line 1-31: Update all occurrences that refer to Indigo plugins to use
the capitalized form "Plugin": change the header "# Canonical CI workflows for
Indigo plugins" to "Plugins", change the sentence "Drop-in GitHub Actions
workflows for any Indigo plugin in the workspace" to "Indigo Plugin", change
"plugin bundle" in the Files/Conventions bullets to "Plugin bundle", and change
"plugin name" in Usage to "Plugin name"; ensure mentions of PluginVersion and
Info.plist remain unchanged (they identify the plist key), and keep filenames
version-check.yml and create-release.yml as-is.
In `@docs/plugin-dev/workflows/version-check.yml`:
- Around line 30-41: Replace the fragile grep|sed parsing in the get_version
step (where PLUGIN_NAME and VERSION are used to read
"${PLUGIN_NAME}.indigoPlugin/Contents/Info.plist") with a robust XML/plist
parser; for example, call xmllint with an XPath that selects the PluginVersion
string or run a short Python snippet using plistlib to load Info.plist and print
the PluginVersion, preserve the existing error check and exit behavior if
PluginVersion is missing, and continue to write the result to GITHUB_OUTPUT
exactly as "version=$VERSION" so downstream steps receive the same variable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9e32e06f-5fd9-411b-a3d1-c305c12ae6b5
📒 Files selected for processing (5)
.claude-plugin/marketplace.json.claude-plugin/plugin.jsondocs/plugin-dev/workflows/README.mddocs/plugin-dev/workflows/create-release.ymldocs/plugin-dev/workflows/version-check.yml
Heatmiser uses HeatmiserNeo.IndigoPlugin (capital I). Linux runners are case-sensitive so -name "*.indigoPlugin" misses it. Switch to -iname so the canonical workflows work for both legacy capitalized bundles and modern lowercase ones. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
basename "$PLUGIN_BUNDLE" .indigoPlugin is case-sensitive: for HeatmiserNeo.IndigoPlugin (capital I) the suffix wasn't stripped, so later steps tried to read HeatmiserNeo.IndigoPlugin.indigoPlugin/... and failed. Drop the basename suffix-strip entirely. The plugin_bundle output now contains the actual directory name (e.g. "HeatmiserNeo.IndigoPlugin" or "Domio.indigoPlugin") which is used verbatim for paths and the asset zip. Asset name preserves original case. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
docs/plugin-dev/workflows/version-check.ymlandcreate-release.ymlas canonical templates that any Indigo plugin can drop in unmodified — they auto-detect the bundle viafind -name '*.indigoPlugin'.actions/checkout@v4,softprops/action-gh-release@v2) and how to copy into a plugin repo.plugin.json+marketplace.jsonto 1.9.2.Why
Workspace audit found 9 of 11 Indigo plugin repos hardcode the bundle name in their CI, 8 still use
softprops/action-gh-release@v1(Node 16, deprecated), 2 have no CI at all, andindigo-home-intelligencehas a zip-filename bug that breaks installs. The templates here are the single source of truth for the rollout to all 11 repos.Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Documentation