Fix homebrew-release workflow for retags and fork URLs#1155
Fix homebrew-release workflow for retags and fork URLs#1155sbryngelson merged 1 commit intoMFlowCode:masterfrom
Conversation
The URL/SHA update patterns only matched MFlowCode/MFC URLs, so the workflow failed when the formula temporarily pointed at a fork (e.g. during testing). Also, the commit step failed when the formula was already up to date (retag scenario). Broaden the URL patterns and skip the push gracefully when there are no changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
📝 WalkthroughWalkthroughThe GitHub Actions Homebrew release workflow is updated to generalize URL pattern matching for any GitHub archive, expand SHA256 update logic to cover all GitHub-based URLs, and introduce conditional push behavior that skips commits when no changes are staged. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Pull request overview
This PR fixes two issues in the homebrew-release.yml GitHub Actions workflow that were causing failures during retag scenarios and when testing with fork URLs:
Changes:
- Broadened URL matching patterns in sed and awk commands to handle any GitHub archive URL (not just
MFlowCode/MFC), enabling the workflow to correctly update formulas that temporarily point to forks during testing - Added graceful handling for no-op updates by checking staged changes before committing, preventing failures when the formula is already at the target version (retag scenario)
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/homebrew-release.yml (1)
181-191: Summary step always claims bottles will build, even on no-op pushes.When the formula is already up to date and no push occurs (retag scenario), this summary still says "The bottle.yml workflow will now build bottles for this release," which is misleading. Consider either gating this step on whether a push actually happened (e.g., via an output from the commit step) or adjusting the message.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/homebrew-release.yml around lines 181 - 191, The Summary step unconditionally states "The bottle.yml workflow will now build bottles" even for no-op retag pushes; update the step to only show that sentence when a push actually occurred by gating it on a prior step's output (e.g., use an output like steps.commit.outputs.pushed or steps.version.outputs.pushed) with the if condition, or alternatively change the message to a neutral phrasing when no push happened (use steps.version.outputs.version and steps.sha256.outputs.sha256 as before, but wrap or vary the bottle.yml sentence based on the push boolean so the Summary reflects the real outcome).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/homebrew-release.yml:
- Around line 181-191: The Summary step unconditionally states "The bottle.yml
workflow will now build bottles" even for no-op retag pushes; update the step to
only show that sentence when a push actually occurred by gating it on a prior
step's output (e.g., use an output like steps.commit.outputs.pushed or
steps.version.outputs.pushed) with the if condition, or alternatively change the
message to a neutral phrasing when no push happened (use
steps.version.outputs.version and steps.sha256.outputs.sha256 as before, but
wrap or vary the bottle.yml sentence based on the push boolean so the Summary
reflects the real outcome).
User description
Summary
homebrew-release.ymlworkflow to handle any GitHub archive URL, not justMFlowCode/MFC. This fixes failures when the formula temporarily points at a fork during testing.Test plan
MFlowCode/MFCand fork URLsgit diff --cached --quietcheck correctly detects no-op updates🤖 Generated with Claude Code
CodeAnt-AI Description
Fix homebrew-release workflow for retags and fork URLs
What Changed
Impact
✅ Fewer failed release runs when formulas point to forks✅ No-op retags no longer cause failed pushes✅ More reliable formula updates during release workflows💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit